Disable signin-to-Chrome when using Guest profile.
[chromium-blink-merge.git] / net / url_request / url_request_job_factory_impl.h
blob4f03fb073d473a1df53a3af36bb3aad22956bbaa
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_IMPL_H_
6 #define NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_IMPL_H_
8 #include <map>
9 #include <vector>
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "net/base/net_export.h"
14 #include "net/url_request/url_request_job_factory.h"
16 namespace net {
18 class NET_EXPORT URLRequestJobFactoryImpl : public URLRequestJobFactory {
19 public:
20 URLRequestJobFactoryImpl();
21 virtual ~URLRequestJobFactoryImpl();
23 // Sets the ProtocolHandler for a scheme. Returns true on success, false on
24 // failure (a ProtocolHandler already exists for |scheme|). On success,
25 // URLRequestJobFactory takes ownership of |protocol_handler|.
26 bool SetProtocolHandler(const std::string& scheme,
27 ProtocolHandler* protocol_handler);
29 // URLRequestJobFactory implementation
30 virtual URLRequestJob* MaybeCreateJobWithProtocolHandler(
31 const std::string& scheme,
32 URLRequest* request,
33 NetworkDelegate* network_delegate) const OVERRIDE;
34 virtual bool IsHandledProtocol(const std::string& scheme) const OVERRIDE;
35 virtual bool IsHandledURL(const GURL& url) const OVERRIDE;
36 virtual bool IsSafeRedirectTarget(const GURL& location) const OVERRIDE;
38 private:
39 typedef std::map<std::string, ProtocolHandler*> ProtocolHandlerMap;
41 ProtocolHandlerMap protocol_handler_map_;
43 DISALLOW_COPY_AND_ASSIGN(URLRequestJobFactoryImpl);
46 } // namespace net
48 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_FACTORY_IMPL_H_