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

Side by Side Diff: chrome/browser/profiles/profile_impl.h

Issue 541103002: Introduce ChromeZoomLevelPref, make zoom level prefs independent of profile prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete access of ZoomController from WebUILoginView. Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_IMPL_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/prefs/pref_change_registrar.h" 16 #include "base/prefs/pref_change_registrar.h"
17 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_impl_io_data.h" 19 #include "chrome/browser/profiles/profile_impl_io_data.h"
20 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h"
20 #include "content/public/browser/content_browser_client.h" 21 #include "content/public/browser/content_browser_client.h"
21 #include "content/public/browser/host_zoom_map.h" 22 #include "content/public/browser/host_zoom_map.h"
22 23
23 class NetPrefObserver; 24 class NetPrefObserver;
24 class PrefService; 25 class PrefService;
25 class PrefServiceSyncable; 26 class PrefServiceSyncable;
26 class ShortcutsBackend; 27 class ShortcutsBackend;
27 class SSLConfigServiceManager; 28 class SSLConfigServiceManager;
28 class TrackedPreferenceValidationDelegate; 29 class TrackedPreferenceValidationDelegate;
29 30
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 virtual Profile* GetOffTheRecordProfile() override; 105 virtual Profile* GetOffTheRecordProfile() override;
105 virtual void DestroyOffTheRecordProfile() override; 106 virtual void DestroyOffTheRecordProfile() override;
106 virtual bool HasOffTheRecordProfile() override; 107 virtual bool HasOffTheRecordProfile() override;
107 virtual Profile* GetOriginalProfile() override; 108 virtual Profile* GetOriginalProfile() override;
108 virtual bool IsSupervised() override; 109 virtual bool IsSupervised() override;
109 virtual history::TopSites* GetTopSites() override; 110 virtual history::TopSites* GetTopSites() override;
110 virtual history::TopSites* GetTopSitesWithoutCreating() override; 111 virtual history::TopSites* GetTopSitesWithoutCreating() override;
111 virtual ExtensionSpecialStoragePolicy* 112 virtual ExtensionSpecialStoragePolicy*
112 GetExtensionSpecialStoragePolicy() override; 113 GetExtensionSpecialStoragePolicy() override;
113 virtual PrefService* GetPrefs() override; 114 virtual PrefService* GetPrefs() override;
115 virtual chrome::ChromeZoomLevelPrefs* GetZoomLevelPrefs() override;
114 virtual PrefService* GetOffTheRecordPrefs() override; 116 virtual PrefService* GetOffTheRecordPrefs() override;
115 virtual net::URLRequestContextGetter* 117 virtual net::URLRequestContextGetter*
116 GetRequestContextForExtensions() override; 118 GetRequestContextForExtensions() override;
117 virtual net::SSLConfigService* GetSSLConfigService() override; 119 virtual net::SSLConfigService* GetSSLConfigService() override;
118 virtual HostContentSettingsMap* GetHostContentSettingsMap() override; 120 virtual HostContentSettingsMap* GetHostContentSettingsMap() override;
119 virtual bool IsSameProfile(Profile* profile) override; 121 virtual bool IsSameProfile(Profile* profile) override;
120 virtual base::Time GetStartTime() const override; 122 virtual base::Time GetStartTime() const override;
121 virtual net::URLRequestContextGetter* CreateRequestContext( 123 virtual net::URLRequestContextGetter* CreateRequestContext(
122 content::ProtocolHandlerMap* protocol_handlers, 124 content::ProtocolHandlerMap* protocol_handlers,
123 content::URLRequestInterceptorScopedVector request_interceptors) override; 125 content::URLRequestInterceptorScopedVector request_interceptors) override;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 static int create_readme_delay_ms; 167 static int create_readme_delay_ms;
166 168
167 ProfileImpl(const base::FilePath& path, 169 ProfileImpl(const base::FilePath& path,
168 Delegate* delegate, 170 Delegate* delegate,
169 CreateMode create_mode, 171 CreateMode create_mode,
170 base::SequencedTaskRunner* sequenced_task_runner); 172 base::SequencedTaskRunner* sequenced_task_runner);
171 173
172 // Does final initialization. Should be called after prefs were loaded. 174 // Does final initialization. Should be called after prefs were loaded.
173 void DoFinalInit(); 175 void DoFinalInit();
174 176
177 // TODO(wjmaclean): Delete this once the HostZoomMap moves to
178 // StoragePartition.
175 void InitHostZoomMap(); 179 void InitHostZoomMap();
176 180
177 void OnDefaultZoomLevelChanged();
178 void OnZoomLevelChanged(
179 const content::HostZoomMap::ZoomLevelChange& change);
180
181 // Does final prefs initialization and calls Init(). 181 // Does final prefs initialization and calls Init().
182 void OnPrefsLoaded(bool success); 182 void OnPrefsLoaded(bool success);
183 183
184 #if defined(ENABLE_SESSION_SERVICE) 184 #if defined(ENABLE_SESSION_SERVICE)
185 void StopCreateSessionServiceTimer(); 185 void StopCreateSessionServiceTimer();
186 186
187 void EnsureSessionServiceCreated(); 187 void EnsureSessionServiceCreated();
188 #endif 188 #endif
189 189
190 190
(...skipping 10 matching lines...) Expand all
201 201
202 void GetCacheParameters(bool is_media_context, 202 void GetCacheParameters(bool is_media_context,
203 base::FilePath* cache_path, 203 base::FilePath* cache_path,
204 int* max_size); 204 int* max_size);
205 205
206 PrefProxyConfigTracker* CreateProxyConfigTracker(); 206 PrefProxyConfigTracker* CreateProxyConfigTracker();
207 207
208 scoped_ptr<domain_reliability::DomainReliabilityMonitor> 208 scoped_ptr<domain_reliability::DomainReliabilityMonitor>
209 CreateDomainReliabilityMonitor(PrefService* local_state); 209 CreateDomainReliabilityMonitor(PrefService* local_state);
210 210
211 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_;
212 PrefChangeRegistrar pref_change_registrar_; 211 PrefChangeRegistrar pref_change_registrar_;
213 212
214 base::FilePath path_; 213 base::FilePath path_;
215 base::FilePath base_cache_path_; 214 base::FilePath base_cache_path_;
216 215
217 // !!! BIG HONKING WARNING !!! 216 // !!! BIG HONKING WARNING !!!
218 // The order of the members below is important. Do not change it unless 217 // The order of the members below is important. Do not change it unless
219 // you know what you're doing. Also, if adding a new member here make sure 218 // you know what you're doing. Also, if adding a new member here make sure
220 // that the declaration occurs AFTER things it depends on as destruction 219 // that the declaration occurs AFTER things it depends on as destruction
221 // happens in reverse order of declaration. 220 // happens in reverse order of declaration.
(...skipping 12 matching lines...) Expand all
234 // Keep |pref_validation_delegate_| above |prefs_| so that the former outlives 233 // Keep |pref_validation_delegate_| above |prefs_| so that the former outlives
235 // the latter. 234 // the latter.
236 scoped_ptr<TrackedPreferenceValidationDelegate> pref_validation_delegate_; 235 scoped_ptr<TrackedPreferenceValidationDelegate> pref_validation_delegate_;
237 236
238 // Keep |prefs_| on top for destruction order because |extension_prefs_|, 237 // Keep |prefs_| on top for destruction order because |extension_prefs_|,
239 // |net_pref_observer_|, |io_data_| and others store pointers to |prefs_| and 238 // |net_pref_observer_|, |io_data_| and others store pointers to |prefs_| and
240 // shall be destructed first. 239 // shall be destructed first.
241 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; 240 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_;
242 scoped_ptr<PrefServiceSyncable> prefs_; 241 scoped_ptr<PrefServiceSyncable> prefs_;
243 scoped_ptr<PrefServiceSyncable> otr_prefs_; 242 scoped_ptr<PrefServiceSyncable> otr_prefs_;
243 // TODO(wjmaclean): This is only here temporarily until HostZoomMap moves
244 // into StoragePartition, after which it will also move to StoragePartition.
245 // Must declare this here so it is destroyed before the profile prefs service.
246 scoped_ptr<chrome::ChromeZoomLevelPrefs> zoom_level_prefs_;
244 ProfileImplIOData::Handle io_data_; 247 ProfileImplIOData::Handle io_data_;
245 #if defined(ENABLE_EXTENSIONS) 248 #if defined(ENABLE_EXTENSIONS)
246 scoped_refptr<ExtensionSpecialStoragePolicy> 249 scoped_refptr<ExtensionSpecialStoragePolicy>
247 extension_special_storage_policy_; 250 extension_special_storage_policy_;
248 #endif 251 #endif
249 scoped_ptr<NetPrefObserver> net_pref_observer_; 252 scoped_ptr<NetPrefObserver> net_pref_observer_;
250 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; 253 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
251 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 254 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
252 scoped_refptr<ShortcutsBackend> shortcuts_backend_; 255 scoped_refptr<ShortcutsBackend> shortcuts_backend_;
253 256
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // components/keyed_service/content/browser_context_keyed_service_factory.* 294 // components/keyed_service/content/browser_context_keyed_service_factory.*
292 295
293 Profile::Delegate* delegate_; 296 Profile::Delegate* delegate_;
294 297
295 chrome_browser_net::Predictor* predictor_; 298 chrome_browser_net::Predictor* predictor_;
296 299
297 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); 300 DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
298 }; 301 };
299 302
300 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 303 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698