Move GetsOrCreateAsarArchive to asar_util.h
This commit is contained in:
parent
64622ceae3
commit
3b3a025ed4
7 changed files with 66 additions and 25 deletions
|
@ -5,8 +5,6 @@
|
|||
#ifndef ATOM_BROWSER_NET_ASAR_ASAR_PROTOCOL_HANDLER_H_
|
||||
#define ATOM_BROWSER_NET_ASAR_ASAR_PROTOCOL_HANDLER_H_
|
||||
|
||||
#include "base/containers/scoped_ptr_hash_map.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "net/url_request/url_request_job_factory.h"
|
||||
|
||||
|
@ -16,16 +14,12 @@ class TaskRunner;
|
|||
|
||||
namespace asar {
|
||||
|
||||
class Archive;
|
||||
|
||||
class AsarProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler {
|
||||
public:
|
||||
explicit AsarProtocolHandler(
|
||||
const scoped_refptr<base::TaskRunner>& file_task_runner);
|
||||
virtual ~AsarProtocolHandler();
|
||||
|
||||
Archive* GetOrCreateAsarArchive(const base::FilePath& path) const;
|
||||
|
||||
// net::URLRequestJobFactory::ProtocolHandler:
|
||||
net::URLRequestJob* MaybeCreateJob(
|
||||
net::URLRequest* request,
|
||||
|
@ -35,8 +29,6 @@ class AsarProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler {
|
|||
private:
|
||||
const scoped_refptr<base::TaskRunner> file_task_runner_;
|
||||
|
||||
mutable base::ScopedPtrHashMap<base::FilePath, Archive> archives_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AsarProtocolHandler);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue