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

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

Issue 14137032: Create profile .ico file on profile creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test, rework Created 7 years, 6 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/memory/weak_ptr.h"
16 #include "base/prefs/pref_change_registrar.h" 17 #include "base/prefs/pref_change_registrar.h"
17 #include "base/timer.h" 18 #include "base/timer.h"
18 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_impl_io_data.h" 20 #include "chrome/browser/profiles/profile_impl_io_data.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;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 void OnPrefsLoaded(bool success); 168 void OnPrefsLoaded(bool success);
168 169
169 base::FilePath GetPrefFilePath(); 170 base::FilePath GetPrefFilePath();
170 171
171 #if defined(ENABLE_SESSION_SERVICE) 172 #if defined(ENABLE_SESSION_SERVICE)
172 void StopCreateSessionServiceTimer(); 173 void StopCreateSessionServiceTimer();
173 174
174 void EnsureSessionServiceCreated(); 175 void EnsureSessionServiceCreated();
175 #endif 176 #endif
176 177
178 // Updates the icon file for this profile if the icon version in the prefs is
179 // out of date.
180 void UpdateProfileIconIfNecessary();
181
182 // Sets the icon version in the prefs on successful icon creation.
183 void OnProfileIconCreateSuccess();
177 184
178 void EnsureRequestContextCreated() { 185 void EnsureRequestContextCreated() {
179 GetRequestContext(); 186 GetRequestContext();
180 } 187 }
181 188
182 void UpdateProfileUserNameCache(); 189 void UpdateProfileUserNameCache();
183 190
184 // Updates the ProfileInfoCache with data from this profile. 191 // Updates the ProfileInfoCache with data from this profile.
185 void UpdateProfileNameCache(); 192 void UpdateProfileNameCache();
186 void UpdateProfileAvatarCache(); 193 void UpdateProfileAvatarCache();
(...skipping 30 matching lines...) Expand all
217 scoped_ptr<PrefServiceSyncable> prefs_; 224 scoped_ptr<PrefServiceSyncable> prefs_;
218 scoped_ptr<PrefServiceSyncable> otr_prefs_; 225 scoped_ptr<PrefServiceSyncable> otr_prefs_;
219 ProfileImplIOData::Handle io_data_; 226 ProfileImplIOData::Handle io_data_;
220 scoped_refptr<ExtensionSpecialStoragePolicy> 227 scoped_refptr<ExtensionSpecialStoragePolicy>
221 extension_special_storage_policy_; 228 extension_special_storage_policy_;
222 scoped_ptr<NetPrefObserver> net_pref_observer_; 229 scoped_ptr<NetPrefObserver> net_pref_observer_;
223 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_; 230 scoped_ptr<SSLConfigServiceManager> ssl_config_service_manager_;
224 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 231 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
225 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; 232 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_;
226 233
234 base::WeakPtrFactory<ProfileImpl> weak_ptr_factory_;
235
227 // Exit type the last time the profile was opened. This is set only once from 236 // Exit type the last time the profile was opened. This is set only once from
228 // prefs. 237 // prefs.
229 ExitType last_session_exit_type_; 238 ExitType last_session_exit_type_;
230 239
231 #if defined(ENABLE_SESSION_SERVICE) 240 #if defined(ENABLE_SESSION_SERVICE)
232 base::OneShotTimer<ProfileImpl> create_session_service_timer_; 241 base::OneShotTimer<ProfileImpl> create_session_service_timer_;
233 #endif 242 #endif
234 243
235 scoped_ptr<Profile> off_the_record_profile_; 244 scoped_ptr<Profile> off_the_record_profile_;
236 245
(...skipping 28 matching lines...) Expand all
265 // components/browser_context_keyed_service/browser_context_keyed_service_fa ctory.{h,cc} 274 // components/browser_context_keyed_service/browser_context_keyed_service_fa ctory.{h,cc}
266 275
267 Profile::Delegate* delegate_; 276 Profile::Delegate* delegate_;
268 277
269 chrome_browser_net::Predictor* predictor_; 278 chrome_browser_net::Predictor* predictor_;
270 279
271 DISALLOW_COPY_AND_ASSIGN(ProfileImpl); 280 DISALLOW_COPY_AND_ASSIGN(ProfileImpl);
272 }; 281 };
273 282
274 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_ 283 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698