Chromium Code Reviews| 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 CHROME_BROWSER_UI_APP_LIST_PROFILE_STORE_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_PROFILE_STORE_H_ |
| 6 #define CHROME_BROWSER_UI_APP_LIST_PROFILE_STORE_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_PROFILE_STORE_H_ |
| 7 | 7 |
| 8 #include <string> | |
|
tapted
2016/01/31 23:04:37
nit: not needed
| |
| 9 | |
| 8 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 9 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 10 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 12 #include "chrome/browser/profiles/profile_attributes_storage.h" |
| 11 | 13 |
| 12 class Profile; | 14 class Profile; |
| 13 | 15 |
| 14 // Represents something that knows how to load profiles asynchronously. | 16 // Represents something that knows how to load profiles asynchronously. |
| 15 class ProfileStore { | 17 class ProfileStore { |
| 16 public: | 18 public: |
| 17 virtual ~ProfileStore() {} | 19 virtual ~ProfileStore() {} |
| 18 virtual void AddProfileObserver(ProfileInfoCacheObserver* observer) = 0; | 20 virtual void AddProfileObserver( |
| 21 ProfileAttributesStorage::Observer* observer) = 0; | |
| 19 | 22 |
| 20 // Loads the profile at |path| and calls |callback| when its done. A NULL | 23 // Loads the profile at |path| and calls |callback| when its done. A NULL |
| 21 // Profile* represents an error. | 24 // Profile* represents an error. |
| 22 virtual void LoadProfileAsync(const base::FilePath& path, | 25 virtual void LoadProfileAsync(const base::FilePath& path, |
| 23 base::Callback<void(Profile*)> callback) = 0; | 26 base::Callback<void(Profile*)> callback) = 0; |
| 24 | 27 |
| 25 // Returns the profile at |path| if it is already loaded. | 28 // Returns the profile at |path| if it is already loaded. |
| 26 virtual Profile* GetProfileByPath(const base::FilePath& path) = 0; | 29 virtual Profile* GetProfileByPath(const base::FilePath& path) = 0; |
| 27 | 30 |
| 28 // The user data directory that profiles are stored under in this instance of | 31 // The user data directory that profiles are stored under in this instance of |
| 29 // Chrome. | 32 // Chrome. |
| 30 virtual base::FilePath GetUserDataDir() = 0; | 33 virtual base::FilePath GetUserDataDir() = 0; |
| 31 | 34 |
| 32 // The name of the last used profile. | 35 // The name of the last used profile. |
| 33 virtual std::string GetLastUsedProfileName() = 0; | 36 virtual std::string GetLastUsedProfileName() = 0; |
| 34 | 37 |
| 35 // Returns true if the profile at |path| is supervised. | 38 // Returns true if the profile at |path| is supervised. |
| 36 virtual bool IsProfileSupervised(const base::FilePath& path) = 0; | 39 virtual bool IsProfileSupervised(const base::FilePath& path) = 0; |
| 37 | 40 |
| 38 // Returns true if the profile at |path| is locked. | 41 // Returns true if the profile at |path| is locked. |
| 39 virtual bool IsProfileLocked(const base::FilePath& path) = 0; | 42 virtual bool IsProfileLocked(const base::FilePath& path) = 0; |
| 40 }; | 43 }; |
| 41 | 44 |
| 42 #endif // CHROME_BROWSER_UI_APP_LIST_PROFILE_STORE_H_ | 45 #endif // CHROME_BROWSER_UI_APP_LIST_PROFILE_STORE_H_ |
| OLD | NEW |