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

Side by Side Diff: chrome/browser/profiles/profile.cc

Issue 381283002: Refactor code that defers extension background page loading (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: larger DeferLoadingBackgroundHosts Created 6 years, 5 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 #include "chrome/browser/profiles/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 // No ProfileSyncService created yet - we don't want to create one, so just 235 // No ProfileSyncService created yet - we don't want to create one, so just
236 // infer the accessible state by looking at prefs/command line flags. 236 // infer the accessible state by looking at prefs/command line flags.
237 sync_driver::SyncPrefs prefs(GetPrefs()); 237 sync_driver::SyncPrefs prefs(GetPrefs());
238 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); 238 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged();
239 } 239 }
240 240
241 void Profile::MaybeSendDestroyedNotification() { 241 void Profile::MaybeSendDestroyedNotification() {
242 if (!sent_destroyed_notification_) { 242 if (!sent_destroyed_notification_) {
243 sent_destroyed_notification_ = true; 243 sent_destroyed_notification_ = true;
244 LOG(ERROR) << "JAMES send profile destroyed";
244 content::NotificationService::current()->Notify( 245 content::NotificationService::current()->Notify(
245 chrome::NOTIFICATION_PROFILE_DESTROYED, 246 chrome::NOTIFICATION_PROFILE_DESTROYED,
246 content::Source<Profile>(this), 247 content::Source<Profile>(this),
247 content::NotificationService::NoDetails()); 248 content::NotificationService::NoDetails());
248 } 249 }
249 } 250 }
250 251
251 bool ProfileCompare::operator()(Profile* a, Profile* b) const { 252 bool ProfileCompare::operator()(Profile* a, Profile* b) const {
252 DCHECK(a && b); 253 DCHECK(a && b);
253 if (a->IsSameProfile(b)) 254 if (a->IsSameProfile(b))
254 return false; 255 return false;
255 return a->GetOriginalProfile() < b->GetOriginalProfile(); 256 return a->GetOriginalProfile() < b->GetOriginalProfile();
256 } 257 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698