| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_MA
NAGER_H_ | |
| 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_MA
NAGER_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "base/compiler_specific.h" | |
| 11 #include "base/macros.h" | |
| 12 | |
| 13 namespace base { | |
| 14 class FilePath; | |
| 15 } | |
| 16 | |
| 17 class BrowserStateInfoCache; | |
| 18 | |
| 19 namespace ios { | |
| 20 | |
| 21 class ChromeBrowserState; | |
| 22 | |
| 23 // Provides methods that allow for various ways of creating non-incognito | |
| 24 // ChromeBrowserState instances. Owns all instances that it creates. | |
| 25 class ChromeBrowserStateManager { | |
| 26 public: | |
| 27 virtual ~ChromeBrowserStateManager() {} | |
| 28 | |
| 29 // Returns the ChromeBrowserState that was last used, creating one if | |
| 30 // necessary. | |
| 31 virtual ChromeBrowserState* GetLastUsedBrowserState() = 0; | |
| 32 | |
| 33 // Returns the ChromeBrowserState associated with |path|, creating one if | |
| 34 // necessary. | |
| 35 virtual ChromeBrowserState* GetBrowserState(const base::FilePath& path) = 0; | |
| 36 | |
| 37 // Returns the BrowserStateInfoCache associated with this manager. | |
| 38 virtual BrowserStateInfoCache* GetBrowserStateInfoCache() = 0; | |
| 39 | |
| 40 // Returns the list of loaded ChromeBrowserStates. | |
| 41 virtual std::vector<ChromeBrowserState*> GetLoadedBrowserStates() = 0; | |
| 42 | |
| 43 protected: | |
| 44 ChromeBrowserStateManager() {} | |
| 45 | |
| 46 private: | |
| 47 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateManager); | |
| 48 }; | |
| 49 | |
| 50 } // namespace ios | |
| 51 | |
| 52 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE
_MANAGER_H_ | |
| OLD | NEW |