Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: ios/chrome/browser/browser_state/chrome_browser_state.h

Issue 1667743002: Implement some methods of ChromeBrowserState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome_browser_state
Patch Set: Address comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/browser_state/DEPS ('k') | ios/chrome/browser/browser_state/chrome_browser_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/browser_state/chrome_browser_state.h
diff --git a/ios/chrome/browser/browser_state/chrome_browser_state.h b/ios/chrome/browser/browser_state/chrome_browser_state.h
index b04c33e543100a70d44babeab1eeaf9130e0cfcc..31548b912ce1939f09463a194119e870c5ad5f93 100644
--- a/ios/chrome/browser/browser_state/chrome_browser_state.h
+++ b/ios/chrome/browser/browser_state/chrome_browser_state.h
@@ -21,6 +21,7 @@ class ChromeBrowserStateIOData;
class PrefProxyConfigTracker;
class PrefService;
class TestChromeBrowserState;
+class TestChromeBrowserStateManager;
namespace base {
class SequencedTaskRunner;
@@ -50,7 +51,7 @@ enum class ChromeBrowserStateType {
// This class is a Chrome-specific extension of the BrowserState interface.
class ChromeBrowserState : public web::BrowserState {
public:
- ~ChromeBrowserState() override {}
+ ~ChromeBrowserState() override;
// Returns the ChromeBrowserState corresponding to the given BrowserState.
static ChromeBrowserState* FromBrowserState(BrowserState* browser_state);
@@ -60,7 +61,7 @@ class ChromeBrowserState : public web::BrowserState {
// Returns sequenced task runner where browser state dependent I/O
// operations should be performed.
- virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() = 0;
+ virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner();
// Returns the original "recording" ChromeBrowserState. This method returns
// |this| if the ChromeBrowserState is not incognito.
@@ -96,7 +97,7 @@ class ChromeBrowserState : public web::BrowserState {
// Retrieves a pointer to the PrefService that manages the preferences as
// a syncable_prefs::PrefServiceSyncable.
- virtual syncable_prefs::PrefServiceSyncable* GetSyncablePrefs() = 0;
+ virtual syncable_prefs::PrefServiceSyncable* GetSyncablePrefs();
// Deletes all network related data since |time|. It deletes transport
// security state since |time| and it also deletes HttpServerProperties data.
@@ -132,12 +133,23 @@ class ChromeBrowserState : public web::BrowserState {
// Returns the current ChromeBrowserState casted as a TestChromeBrowserState
// or null if it is not a TestChromeBrowserState.
- virtual TestChromeBrowserState* AsTestChromeBrowserState() = 0;
+ // TODO(crbug.com/583682): This method should not be used. It is there for
+ // supporting a legacy test, and will be removed as soon as the deprecated
+ // test is removed.
+ virtual TestChromeBrowserState* AsTestChromeBrowserState();
+
+ // web::BrowserState
+ net::URLRequestContextGetter* GetRequestContext() override;
protected:
- ChromeBrowserState() {}
+ ChromeBrowserState();
private:
+ friend class ::TestChromeBrowserState;
+ friend class ::TestChromeBrowserStateManager;
+
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
+
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState);
};
« no previous file with comments | « ios/chrome/browser/browser_state/DEPS ('k') | ios/chrome/browser/browser_state/chrome_browser_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698