Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / ios / public / provider / chrome / browser / browser_state / chrome_browser_state.h
blob781bb931c4085db462281adaf7d131e688e28a61
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
3 // found in the LICENSE file.
5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ios/web/public/browser_state.h"
12 class PrefService;
14 namespace ios {
16 // This class is a Chrome-specific extension of the BrowserState interface.
17 class ChromeBrowserState : public web::BrowserState {
18 public:
19 ~ChromeBrowserState() override {}
21 // Returns the ChromeBrowserState corresponding to the given BrowserState.
22 static ChromeBrowserState* FromBrowserState(BrowserState* browser_state);
24 // Returns the original "recording" ChromeBrowserState. This method returns
25 // |this| if the ChromeBrowserState is not incognito.
26 virtual ChromeBrowserState* GetOriginalChromeBrowserState() = 0;
28 // Returns the incognito version of this ChromeBrowserState. The returned
29 // ChromeBrowserState instance is owned by this ChromeBrowserState instance.
30 // WARNING: This will create the OffTheRecord ChromeBrowserState if it
31 // doesn't already exist.
32 virtual ChromeBrowserState* GetOffTheRecordChromeBrowserState() = 0;
34 // Destroys the OffTheRecord ChromeBrowserState that is associated with this
35 // ChromeBrowserState, if one exists.
36 virtual void DestroyOffTheRecordChromeBrowserState() = 0;
38 // Retrieves a pointer to the PrefService that manages the preferences.
39 virtual PrefService* GetPrefs() = 0;
41 protected:
42 ChromeBrowserState() {}
44 private:
45 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserState);
48 } // namespace ios
50 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_H_