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

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

Issue 10656033: [sync] Automatic bootstrapping of Sync on Win 8 from cached credentials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fully decouple PSS and CCS. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/credential_cache_service_factory_win.cc
diff --git a/chrome/browser/sync/credential_cache_service_factory_win.cc b/chrome/browser/sync/credential_cache_service_factory_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0750489f576fb422e547dde6acff7445349c5ffd
--- /dev/null
+++ b/chrome/browser/sync/credential_cache_service_factory_win.cc
@@ -0,0 +1,39 @@
+// 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.
+
+#include "chrome/browser/sync/credential_cache_service_factory_win.h"
+
+#include "base/memory/singleton.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_dependency_manager.h"
+#include "chrome/browser/sync/credential_cache_service_win.h"
+
+namespace syncer {
+
+// static
+CredentialCacheServiceFactory* CredentialCacheServiceFactory::GetInstance() {
+ return Singleton<CredentialCacheServiceFactory>::get();
+}
+
+// static
+syncer::CredentialCacheService* CredentialCacheServiceFactory::GetForProfile(
+ Profile* profile) {
+ return static_cast<syncer::CredentialCacheService*>(
+ GetInstance()->GetServiceForProfile(profile, true));
+}
+
+CredentialCacheServiceFactory::CredentialCacheServiceFactory()
+ : ProfileKeyedServiceFactory("CredentialCacheService",
+ ProfileDependencyManager::GetInstance()) {
+}
+
+CredentialCacheServiceFactory::~CredentialCacheServiceFactory() {
+}
+
+ProfileKeyedService* CredentialCacheServiceFactory::BuildServiceInstanceFor(
+ Profile* profile) const {
+ return new syncer::CredentialCacheService(profile);
+}
+
+} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698