Caching the Archive object.
This commit is contained in:
parent
b01db4aa09
commit
b6583635d4
5 changed files with 38 additions and 13 deletions
|
@ -5,6 +5,8 @@
|
|||
#ifndef ATOM_BROWSER_NET_ASAR_ASAR_PROTOCOL_HANDLER_H_
|
||||
#define ATOM_BROWSER_NET_ASAR_ASAR_PROTOCOL_HANDLER_H_
|
||||
|
||||
#include "base/containers/hash_tables.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "net/url_request/url_request_job_factory.h"
|
||||
|
||||
|
@ -14,6 +16,8 @@ class TaskRunner;
|
|||
|
||||
namespace asar {
|
||||
|
||||
class Archive;
|
||||
|
||||
class AsarProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler {
|
||||
public:
|
||||
explicit AsarProtocolHandler(
|
||||
|
@ -29,6 +33,9 @@ class AsarProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler {
|
|||
private:
|
||||
const scoped_refptr<base::TaskRunner> file_task_runner_;
|
||||
|
||||
mutable base::hash_map<base::FilePath, // NOLINT
|
||||
scoped_refptr<Archive> > archives_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AsarProtocolHandler);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue