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

Side by Side Diff: chrome/browser/sync/credential_cache_service_factory_win.cc

Issue 10855063: [sync] Enable sync credential caching by default for post-M22 builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/sync/credential_cache_service_factory_win.h" 5 #include "chrome/browser/sync/credential_cache_service_factory_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ProfileManager::GetDefaultProfileDir(default_user_data_dir); 54 ProfileManager::GetDefaultProfileDir(default_user_data_dir);
55 } 55 }
56 56
57 bool CredentialCacheServiceFactory::ServiceIsCreatedWithProfile() { 57 bool CredentialCacheServiceFactory::ServiceIsCreatedWithProfile() {
58 return true; 58 return true;
59 } 59 }
60 60
61 ProfileKeyedService* CredentialCacheServiceFactory::BuildServiceInstanceFor( 61 ProfileKeyedService* CredentialCacheServiceFactory::BuildServiceInstanceFor(
62 Profile* profile) const { 62 Profile* profile) const {
63 // Only instantiate a CredentialCacheService object if we are running in the 63 // Only instantiate a CredentialCacheService object if we are running in the
64 // default profile on Windows 8, and if credential caching is enabled. 64 // default profile on Windows 8, and if credential caching is not disabled.
65 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 65 const CommandLine* command_line = CommandLine::ForCurrentProcess();
66 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && 66 if (base::win::GetVersion() >= base::win::VERSION_WIN8 &&
67 IsDefaultProfile(profile) && 67 IsDefaultProfile(profile) &&
68 command_line->HasSwitch(switches::kEnableSyncCredentialCaching)) { 68 !command_line->HasSwitch(switches::kDisableSyncCredentialCaching)) {
69 return new syncer::CredentialCacheService(profile); 69 return new syncer::CredentialCacheService(profile);
70 } 70 }
71 return NULL; 71 return NULL;
72 } 72 }
73 73
74 } // namespace syncer 74 } // namespace syncer
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698