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

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

Issue 15968002: Revert 201837 "OOP import on Windows." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 return false; 160 return false;
161 #endif 161 #endif
162 } 162 }
163 163
164 bool Profile::IsNewProfile() { 164 bool Profile::IsNewProfile() {
165 // The profile has been shut down if the prefs were loaded from disk, unless 165 // The profile has been shut down if the prefs were loaded from disk, unless
166 // first-run autoimport wrote them and reloaded the pref service. 166 // first-run autoimport wrote them and reloaded the pref service.
167 // TODO(dconnelly): revisit this when crbug.com/22142 (unifying the profile 167 // TODO(dconnelly): revisit this when crbug.com/22142 (unifying the profile
168 // import code) is fixed. 168 // import code) is fixed.
169 return GetOriginalProfile()->GetPrefs()->GetInitializationStatus() == 169 return GetOriginalProfile()->GetPrefs()->GetInitializationStatus() ==
170 PrefService::INITIALIZATION_STATUS_CREATED_NEW_PREF_STORE; 170 PrefService::INITIALIZATION_STATUS_CREATED_NEW_PREF_STORE ||
171 first_run::DidPerformProfileImport(NULL);
171 } 172 }
172 173
173 bool Profile::IsSyncAccessible() { 174 bool Profile::IsSyncAccessible() {
174 browser_sync::SyncPrefs prefs(GetPrefs()); 175 browser_sync::SyncPrefs prefs(GetPrefs());
175 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged(); 176 return ProfileSyncService::IsSyncEnabled() && !prefs.IsManaged();
176 } 177 }
177 178
178 void Profile::MaybeSendDestroyedNotification() { 179 void Profile::MaybeSendDestroyedNotification() {
179 if (!sent_destroyed_notification_) { 180 if (!sent_destroyed_notification_) {
180 sent_destroyed_notification_ = true; 181 sent_destroyed_notification_ = true;
181 content::NotificationService::current()->Notify( 182 content::NotificationService::current()->Notify(
182 chrome::NOTIFICATION_PROFILE_DESTROYED, 183 chrome::NOTIFICATION_PROFILE_DESTROYED,
183 content::Source<Profile>(this), 184 content::Source<Profile>(this),
184 content::NotificationService::NoDetails()); 185 content::NotificationService::NoDetails());
185 } 186 }
186 } 187 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698