| 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 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 virtual net::SSLConfigService* GetSSLConfigService() = 0; | 119 virtual net::SSLConfigService* GetSSLConfigService() = 0; |
| 120 | 120 |
| 121 // Creates the main net::URLRequestContextGetter that will be returned by | 121 // Creates the main net::URLRequestContextGetter that will be returned by |
| 122 // GetRequestContext(). Should only be called once. | 122 // GetRequestContext(). Should only be called once. |
| 123 virtual net::URLRequestContextGetter* CreateRequestContext( | 123 virtual net::URLRequestContextGetter* CreateRequestContext( |
| 124 std::map<std::string, | 124 std::map<std::string, |
| 125 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>>* | 125 linked_ptr<net::URLRequestJobFactory::ProtocolHandler>>* |
| 126 protocol_handlers, | 126 protocol_handlers, |
| 127 ScopedVector<net::URLRequestInterceptor> request_interceptors) = 0; | 127 ScopedVector<net::URLRequestInterceptor> request_interceptors) = 0; |
| 128 | 128 |
| 129 // Creates a isolated net::URLRequestContextGetter. Should only be called once | |
| 130 // per partition_path per browser state object. | |
| 131 virtual net::URLRequestContextGetter* CreateIsolatedRequestContext( | |
| 132 const base::FilePath& partition_path) = 0; | |
| 133 | |
| 134 // Returns the current ChromeBrowserState casted as a TestChromeBrowserState | 129 // Returns the current ChromeBrowserState casted as a TestChromeBrowserState |
| 135 // or null if it is not a TestChromeBrowserState. | 130 // or null if it is not a TestChromeBrowserState. |
| 136 // TODO(crbug.com/583682): This method should not be used. It is there for | 131 // 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 | 132 // supporting a legacy test, and will be removed as soon as the deprecated |
| 138 // test is removed. | 133 // test is removed. |
| 139 virtual TestChromeBrowserState* AsTestChromeBrowserState(); | 134 virtual TestChromeBrowserState* AsTestChromeBrowserState(); |
| 140 | 135 |
| 141 // web::BrowserState | 136 // web::BrowserState |
| 142 net::URLRequestContextGetter* GetRequestContext() override; | 137 net::URLRequestContextGetter* GetRequestContext() override; |
| 143 | 138 |
| 144 protected: | 139 protected: |
| 145 ChromeBrowserState(); | 140 ChromeBrowserState(); |
| 146 | 141 |
| 147 private: | 142 private: |
| 148 friend class ::TestChromeBrowserState; | 143 friend class ::TestChromeBrowserState; |
| 149 friend class ::TestChromeBrowserStateManager; | 144 friend class ::TestChromeBrowserStateManager; |
| 150 | 145 |
| 151 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 146 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
| 152 | 147 |
| 153 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState); | 148 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState); |
| 154 }; | 149 }; |
| 155 | 150 |
| 156 } // namespace ios | 151 } // namespace ios |
| 157 | 152 |
| 158 #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ | 153 #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_ |
| OLD | NEW |