| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WEB_SHELL_SHELL_BROWSER_STATE_H_ | 5 #ifndef IOS_WEB_SHELL_SHELL_BROWSER_STATE_H_ |
| 6 #define IOS_WEB_SHELL_SHELL_BROWSER_STATE_H_ | 6 #define IOS_WEB_SHELL_SHELL_BROWSER_STATE_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "ios/web/public/browser_state.h" | 11 #include "ios/web/public/browser_state.h" |
| 12 | 12 |
| 13 namespace web { | 13 namespace web { |
| 14 | 14 |
| 15 class ShellBrowserContext; | |
| 16 class ShellURLRequestContextGetter; | 15 class ShellURLRequestContextGetter; |
| 17 | 16 |
| 18 // Shell-specific implementation of BrowserState. Can only be called from the | 17 // Shell-specific implementation of BrowserState. Can only be called from the |
| 19 // UI thread. | 18 // UI thread. |
| 20 class ShellBrowserState : public BrowserState { | 19 class ShellBrowserState : public BrowserState { |
| 21 public: | 20 public: |
| 22 ShellBrowserState(); | 21 ShellBrowserState(); |
| 23 ~ShellBrowserState() override; | 22 ~ShellBrowserState() override; |
| 24 | 23 |
| 25 // BrowserState implementation. | 24 // BrowserState implementation. |
| 26 bool IsOffTheRecord() const override; | 25 bool IsOffTheRecord() const override; |
| 27 base::FilePath GetStatePath() const override; | 26 base::FilePath GetStatePath() const override; |
| 28 net::URLRequestContextGetter* GetRequestContext() override; | 27 net::URLRequestContextGetter* GetRequestContext() override; |
| 29 | 28 |
| 30 private: | 29 private: |
| 31 base::FilePath path_; | 30 base::FilePath path_; |
| 32 scoped_refptr<ShellURLRequestContextGetter> request_context_getter_; | 31 scoped_refptr<ShellURLRequestContextGetter> request_context_getter_; |
| 33 | 32 |
| 34 DISALLOW_COPY_AND_ASSIGN(ShellBrowserState); | 33 DISALLOW_COPY_AND_ASSIGN(ShellBrowserState); |
| 35 }; | 34 }; |
| 36 | 35 |
| 37 } // namespace web | 36 } // namespace web |
| 38 | 37 |
| 39 #endif // IOS_WEB_SHELL_SHELL_BROWSER_STATE_H_ | 38 #endif // IOS_WEB_SHELL_SHELL_BROWSER_STATE_H_ |
| OLD | NEW |