| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This class gathers state related to a single user profile. | 5 // This class gathers state related to a single user profile. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ |
| 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // or if one profile is the incognito version of another profile (or vice | 216 // or if one profile is the incognito version of another profile (or vice |
| 217 // versa). | 217 // versa). |
| 218 virtual bool IsSameProfile(Profile* profile) = 0; | 218 virtual bool IsSameProfile(Profile* profile) = 0; |
| 219 | 219 |
| 220 // Returns the time the profile was started. This is not the time the profile | 220 // Returns the time the profile was started. This is not the time the profile |
| 221 // was created, rather it is the time the user started chrome and logged into | 221 // was created, rather it is the time the user started chrome and logged into |
| 222 // this profile. For the single profile case, this corresponds to the time | 222 // this profile. For the single profile case, this corresponds to the time |
| 223 // the user started chrome. | 223 // the user started chrome. |
| 224 virtual base::Time GetStartTime() const = 0; | 224 virtual base::Time GetStartTime() const = 0; |
| 225 | 225 |
| 226 // Creates the main net::URLRequestContextGetter that will be returned by | |
| 227 // GetRequestContext(). Should only be called once per ContentBrowserClient | |
| 228 // object. This function is exposed because of the circular dependency where | |
| 229 // GetStoragePartition() is used to retrieve the request context, but creation | |
| 230 // still has to happen in the Profile so the StoragePartition calls | |
| 231 // ContextBrowserClient to call this function. | |
| 232 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. | |
| 233 virtual net::URLRequestContextGetter* CreateRequestContext( | |
| 234 content::ProtocolHandlerMap* protocol_handlers, | |
| 235 content::URLRequestInterceptorScopedVector request_interceptors) = 0; | |
| 236 | |
| 237 // Creates the net::URLRequestContextGetter for a StoragePartition. Should | |
| 238 // only be called once per partition_path per ContentBrowserClient object. | |
| 239 // This function is exposed because the request context is retrieved from the | |
| 240 // StoragePartition, but creation still has to happen in the Profile so the | |
| 241 // StoragePartition calls ContextBrowserClient to call this function. | |
| 242 // TODO(ajwong): Remove once http://crbug.com/159193 is resolved. | |
| 243 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | |
| 244 const base::FilePath& partition_path, | |
| 245 bool in_memory, | |
| 246 content::ProtocolHandlerMap* protocol_handlers, | |
| 247 content::URLRequestInterceptorScopedVector request_interceptors) = 0; | |
| 248 | |
| 249 // Returns the last directory that was chosen for uploading or opening a file. | 226 // Returns the last directory that was chosen for uploading or opening a file. |
| 250 virtual base::FilePath last_selected_directory() = 0; | 227 virtual base::FilePath last_selected_directory() = 0; |
| 251 virtual void set_last_selected_directory(const base::FilePath& path) = 0; | 228 virtual void set_last_selected_directory(const base::FilePath& path) = 0; |
| 252 | 229 |
| 253 #if defined(OS_CHROMEOS) | 230 #if defined(OS_CHROMEOS) |
| 254 enum AppLocaleChangedVia { | 231 enum AppLocaleChangedVia { |
| 255 // Caused by chrome://settings change. | 232 // Caused by chrome://settings change. |
| 256 APP_LOCALE_CHANGED_VIA_SETTINGS, | 233 APP_LOCALE_CHANGED_VIA_SETTINGS, |
| 257 // Locale has been reverted via LocaleChangeGuard. | 234 // Locale has been reverted via LocaleChangeGuard. |
| 258 APP_LOCALE_CHANGED_VIA_REVERT, | 235 APP_LOCALE_CHANGED_VIA_REVERT, |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 373 |
| 397 DISALLOW_COPY_AND_ASSIGN(Profile); | 374 DISALLOW_COPY_AND_ASSIGN(Profile); |
| 398 }; | 375 }; |
| 399 | 376 |
| 400 // The comparator for profile pointers as key in a map. | 377 // The comparator for profile pointers as key in a map. |
| 401 struct ProfileCompare { | 378 struct ProfileCompare { |
| 402 bool operator()(Profile* a, Profile* b) const; | 379 bool operator()(Profile* a, Profile* b) const; |
| 403 }; | 380 }; |
| 404 | 381 |
| 405 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 382 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
| OLD | NEW |