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

Unified Diff: chrome/browser/sync/profile_sync_components_factory_impl.cc

Issue 9232011: sync: Make ProfileSyncService a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/profile_sync_components_factory_impl.cc
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc
index 6628d7c26470459bd0bb81b0f1f993bc1e077a23..6e50cfbb3cb7938fed6cc93871f4ecce68d81a07 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,7 +6,6 @@
#include "chrome/browser/extensions/app_notification_manager.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/settings/settings_backend.h"
-#include "chrome/browser/defaults.h"
#include "chrome/browser/prefs/pref_model_associator.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service.h"
@@ -89,28 +88,6 @@ ProfileSyncComponentsFactoryImpl::ProfileSyncComponentsFactoryImpl(
command_line_(command_line) {
}
-ProfileSyncService*
- ProfileSyncComponentsFactoryImpl::CreateProfileSyncService() {
- ProfileSyncService::StartBehavior behavior =
- browser_defaults::kSyncAutoStarts ? ProfileSyncService::AUTO_START
- : ProfileSyncService::MANUAL_START;
-
- PrefService* prefs = profile_->GetPrefs();
- SigninManager* signin = new SigninManager();
- signin->SetAuthenticatedUsername(prefs->GetString(
- prefs::kGoogleServicesUsername));
-
- // TODO(tim): Currently, AUTO/MANUAL settings refer to the *first* time sync
- // is set up and *not* a browser restart for a manual-start platform (where
- // sync has already been set up, and should be able to start without user
- // intervention). We can get rid of the browser_default eventually, but
- // need to take care that ProfileSyncService doesn't get tripped up between
- // those two cases. Bug 88109.
- ProfileSyncService* pss = new ProfileSyncService(
- this, profile_, signin, behavior);
- return pss;
-}
-
void ProfileSyncComponentsFactoryImpl::RegisterDataTypes(
ProfileSyncService* pss) {
// App sync is enabled by default. Register unless explicitly

Powered by Google App Engine
This is Rietveld 408576698