| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ | 5 #ifndef IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ |
| 6 #define IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ | 6 #define IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
| 17 #include "ios/chrome/browser/net/net_types.h" |
| 17 #include "ios/web/public/browser_state.h" | 18 #include "ios/web/public/browser_state.h" |
| 18 #include "net/url_request/url_request_job_factory.h" | 19 #include "net/url_request/url_request_job_factory.h" |
| 19 | 20 |
| 20 class ChromeBrowserStateIOData; | 21 class ChromeBrowserStateIOData; |
| 21 class PrefProxyConfigTracker; | 22 class PrefProxyConfigTracker; |
| 22 class PrefService; | 23 class PrefService; |
| 23 class TestChromeBrowserState; | 24 class TestChromeBrowserState; |
| 24 class TestChromeBrowserStateManager; | 25 class TestChromeBrowserStateManager; |
| 25 | 26 |
| 26 namespace base { | 27 namespace base { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 118 |
| 118 // Returns the SSLConfigService for this browser state. | 119 // Returns the SSLConfigService for this browser state. |
| 119 virtual net::SSLConfigService* GetSSLConfigService() = 0; | 120 virtual net::SSLConfigService* GetSSLConfigService() = 0; |
| 120 | 121 |
| 121 // Creates the main net::URLRequestContextGetter that will be returned by | 122 // Creates the main net::URLRequestContextGetter that will be returned by |
| 122 // GetRequestContext(). Should only be called once. | 123 // GetRequestContext(). Should only be called once. |
| 123 virtual net::URLRequestContextGetter* CreateRequestContext( | 124 virtual net::URLRequestContextGetter* CreateRequestContext( |
| 124 std::map<std::string, | 125 std::map<std::string, |
| 125 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>>* | 126 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>>* |
| 126 protocol_handlers, | 127 protocol_handlers, |
| 127 ScopedVector<net::URLRequestInterceptor> request_interceptors) = 0; | 128 URLRequestInterceptorScopedVector request_interceptors) = 0; |
| 128 | 129 |
| 129 // Creates a isolated net::URLRequestContextGetter. Should only be called once | 130 // Creates a isolated net::URLRequestContextGetter. Should only be called once |
| 130 // per partition_path per browser state object. | 131 // per partition_path per browser state object. |
| 131 virtual net::URLRequestContextGetter* CreateIsolatedRequestContext( | 132 virtual net::URLRequestContextGetter* CreateIsolatedRequestContext( |
| 132 const base::FilePath& partition_path) = 0; | 133 const base::FilePath& partition_path) = 0; |
| 133 | 134 |
| 134 // Returns the current ChromeBrowserState casted as a TestChromeBrowserState | 135 // Returns the current ChromeBrowserState casted as a TestChromeBrowserState |
| 135 // or null if it is not a TestChromeBrowserState. | 136 // or null if it is not a TestChromeBrowserState. |
| 136 // TODO(crbug.com/583682): This method should not be used. It is there for | 137 // TODO(crbug.com/583682): This method should not be used. It is there for |
| 137 // supporting a legacy test, and will be removed as soon as the deprecated | 138 // supporting a legacy test, and will be removed as soon as the deprecated |
| (...skipping 11 matching lines...) Expand all Loading... |
| 149 friend class ::TestChromeBrowserStateManager; | 150 friend class ::TestChromeBrowserStateManager; |
| 150 | 151 |
| 151 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 152 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
| 152 | 153 |
| 153 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState); | 154 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState); |
| 154 }; | 155 }; |
| 155 | 156 |
| 156 } // namespace ios | 157 } // namespace ios |
| 157 | 158 |
| 158 #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ | 159 #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ |
| OLD | NEW |