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

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

Issue 12670013: Out-of-process import on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep Google Toolbar import in-process. Created 7 years, 7 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return false; 138 return false;
139 #endif 139 #endif
140 } 140 }
141 141
142 bool Profile::IsNewProfile() { 142 bool Profile::IsNewProfile() {
143 // The profile has been shut down if the prefs were loaded from disk, unless 143 // The profile has been shut down if the prefs were loaded from disk, unless
144 // first-run autoimport wrote them and reloaded the pref service. 144 // first-run autoimport wrote them and reloaded the pref service.
145 // TODO(dconnelly): revisit this when crbug.com/22142 (unifying the profile 145 // TODO(dconnelly): revisit this when crbug.com/22142 (unifying the profile
146 // import code) is fixed. 146 // import code) is fixed.
147 return GetOriginalProfile()->GetPrefs()->GetInitializationStatus() == 147 return GetOriginalProfile()->GetPrefs()->GetInitializationStatus() ==
148 PrefService::INITIALIZATION_STATUS_CREATED_NEW_PREF_STORE || 148 PrefService::INITIALIZATION_STATUS_CREATED_NEW_PREF_STORE;
149 first_run::DidPerformProfileImport(NULL);
150 } 149 }
151 150
152 bool Profile::IsSyncAccessible() { 151 bool Profile::IsSyncAccessible() {
153 browser_sync::SyncPrefs prefs(GetPrefs()); 152 browser_sync::SyncPrefs prefs(GetPrefs());
154 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); 153 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged();
155 } 154 }
156 155
157 void Profile::MaybeSendDestroyedNotification() { 156 void Profile::MaybeSendDestroyedNotification() {
158 if (!sent_destroyed_notification_) { 157 if (!sent_destroyed_notification_) {
159 sent_destroyed_notification_ = true; 158 sent_destroyed_notification_ = true;
160 content::NotificationService::current()->Notify( 159 content::NotificationService::current()->Notify(
161 chrome::NOTIFICATION_PROFILE_DESTROYED, 160 chrome::NOTIFICATION_PROFILE_DESTROYED,
162 content::Source<Profile>(this), 161 content::Source<Profile>(this),
163 content::NotificationService::NoDetails()); 162 content::NotificationService::NoDetails());
164 } 163 }
165 } 164 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698