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

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: Rebase to fix scoped_refptr conversion. Created 6 years, 3 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
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 "content/public/browser/content_browser_client.h" 20 #include "content/public/browser/content_browser_client.h"
21 #include "content/public/browser/host_zoom_map.h" 21 #include "content/public/browser/host_zoom_map.h"
22 #include "content/public/browser/zoom_level_prefs_store.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
30 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
31 namespace chromeos { 32 namespace chromeos {
(...skipping 72 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 PrefService* 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_; 211 // TODO(wjmaclean): This is only here temporarily until HostZoomMap moves
212 // into StoragePartition, after which it will also move to StoragePartition.
213 scoped_ptr<content::ZoomLevelPrefsStore> zoom_level_prefs_store_;
212 PrefChangeRegistrar pref_change_registrar_; 214 PrefChangeRegistrar pref_change_registrar_;
213 215
214 base::FilePath path_; 216 base::FilePath path_;
215 base::FilePath base_cache_path_; 217 base::FilePath base_cache_path_;
216 218
217 // !!! BIG HONKING WARNING !!! 219 // !!! BIG HONKING WARNING !!!
218 // The order of the members below is important. Do not change it unless 220 // 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 221 // 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 222 // that the declaration occurs AFTER things it depends on as destruction
221 // happens in reverse order of declaration. 223 // happens in reverse order of declaration.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // components/keyed_service/content/browser_context_keyed_service_factory.* 293 // components/keyed_service/content/browser_context_keyed_service_factory.*
292 294
293 Profile::Delegate* delegate_; 295 Profile::Delegate* delegate_;
294 296
295 chrome_browser_net::Predictor* predictor_; 297 chrome_browser_net::Predictor* predictor_;
296 298
297 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); 299 DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
298 }; 300 };
299 301
300 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 302 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698