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

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

Issue 9764006: Make ExtensionPrefValueMap a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: includes Created 8 years, 9 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 | Annotate | Revision Log
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 #pragma once 9 #pragma once
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/timer.h" 17 #include "base/timer.h"
18 #include "chrome/browser/prefs/pref_change_registrar.h" 18 #include "chrome/browser/prefs/pref_change_registrar.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/profiles/profile_impl_io_data.h" 20 #include "chrome/browser/profiles/profile_impl_io_data.h"
21 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
22 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
23 23
24 class ExtensionNavigationObserver; 24 class ExtensionNavigationObserver;
25 class ExtensionPrefs; 25 class ExtensionPrefs;
26 class ExtensionPrefValueMap;
27 class NetPrefObserver; 26 class NetPrefObserver;
28 class PrefService; 27 class PrefService;
29 class PromoResourceService; 28 class PromoResourceService;
30 class SSLConfigServiceManager; 29 class SSLConfigServiceManager;
31 class VisitedLinkEventListener; 30 class VisitedLinkEventListener;
32 31
33 #if defined(OS_CHROMEOS) 32 #if defined(OS_CHROMEOS)
34 namespace chromeos { 33 namespace chromeos {
35 class EnterpriseExtensionObserver; 34 class EnterpriseExtensionObserver;
36 class LocaleChangeGuard; 35 class LocaleChangeGuard;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 FilePath GetPrefFilePath(); 166 FilePath GetPrefFilePath();
168 167
169 void StopCreateSessionServiceTimer(); 168 void StopCreateSessionServiceTimer();
170 169
171 void EnsureRequestContextCreated() { 170 void EnsureRequestContextCreated() {
172 GetRequestContext(); 171 GetRequestContext();
173 } 172 }
174 173
175 void EnsureSessionServiceCreated(); 174 void EnsureSessionServiceCreated();
176 175
177 ExtensionPrefValueMap* GetExtensionPrefValueMap();
178
179 void UpdateProfileUserNameCache(); 176 void UpdateProfileUserNameCache();
180 177
181
182 // Updates the ProfileInfoCache with data from this profile. 178 // Updates the ProfileInfoCache with data from this profile.
183 void UpdateProfileNameCache(); 179 void UpdateProfileNameCache();
184 void UpdateProfileAvatarCache(); 180 void UpdateProfileAvatarCache();
185 181
186 void GetCacheParameters(bool is_media_context, 182 void GetCacheParameters(bool is_media_context,
187 FilePath* cache_path, 183 FilePath* cache_path,
188 int* max_size); 184 int* max_size);
189 185
190 content::NotificationRegistrar registrar_; 186 content::NotificationRegistrar registrar_;
191 PrefChangeRegistrar pref_change_registrar_; 187 PrefChangeRegistrar pref_change_registrar_;
192 188
193 FilePath path_; 189 FilePath path_;
194 FilePath base_cache_path_; 190 FilePath base_cache_path_;
195 191
196 // !!! BIG HONKING WARNING !!! 192 // !!! BIG HONKING WARNING !!!
197 // The order of the members below is important. Do not change it unless 193 // The order of the members below is important. Do not change it unless
198 // you know what you're doing. Also, if adding a new member here make sure 194 // you know what you're doing. Also, if adding a new member here make sure
199 // that the declaration occurs AFTER things it depends on as destruction 195 // that the declaration occurs AFTER things it depends on as destruction
200 // happens in reverse order of declaration. 196 // happens in reverse order of declaration.
201 197
202 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
203 // Keep |prefs_| on top for destruction order because |extension_prefs_|, 198 // Keep |prefs_| on top for destruction order because |extension_prefs_|,
204 // |net_pref_observer_|, |web_resource_service_|, and |io_data_| store 199 // |net_pref_observer_|, |web_resource_service_|, and |io_data_| store
205 // pointers to |prefs_| and shall be destructed first. 200 // pointers to |prefs_| and shall be destructed first.
206 scoped_ptr<PrefService> prefs_; 201 scoped_ptr<PrefService> prefs_;
207 scoped_ptr<PrefService> otr_prefs_; 202 scoped_ptr<PrefService> otr_prefs_;
208 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_; 203 scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_;
209 scoped_ptr<VisitedLinkMaster> visited_link_master_; 204 scoped_ptr<VisitedLinkMaster> visited_link_master_;
210 ProfileImplIOData::Handle io_data_; 205 ProfileImplIOData::Handle io_data_;
211 // Keep extension_prefs_ on top of extension_service_ because the latter 206 // Keep extension_prefs_ on top of extension_service_ because the latter
212 // maintains a pointer to the first and shall be destructed first. 207 // maintains a pointer to the first and shall be destructed first.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 Profile::Delegate* delegate_; 295 Profile::Delegate* delegate_;
301 296
302 chrome_browser_net::Predictor* predictor_; 297 chrome_browser_net::Predictor* predictor_;
303 298
304 bool session_restore_enabled_; 299 bool session_restore_enabled_;
305 300
306 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); 301 DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
307 }; 302 };
308 303
309 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 304 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698