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

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

Issue 11365112: Change PrefStore::ReadResult to a boolean. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 1 month 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 | « chrome/browser/prefs/pref_value_store.cc ('k') | chrome/service/service_process_prefs.cc » ('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_win.h" 5 #include "chrome/browser/sync/credential_cache_service_win.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 &CredentialCacheService::LookForCachedCredentialsInAlternateProfile, 354 &CredentialCacheService::LookForCachedCredentialsInAlternateProfile,
355 weak_factory_.GetWeakPtr())); 355 weak_factory_.GetWeakPtr()));
356 MessageLoop::current()->PostDelayedTask( 356 MessageLoop::current()->PostDelayedTask(
357 FROM_HERE, 357 FROM_HERE,
358 next_read_.callback(), 358 next_read_.callback(),
359 TimeDelta::FromSeconds(delay_secs)); 359 TimeDelta::FromSeconds(delay_secs));
360 } 360 }
361 361
362 bool CredentialCacheService::HasPref(scoped_refptr<JsonPrefStore> store, 362 bool CredentialCacheService::HasPref(scoped_refptr<JsonPrefStore> store,
363 const std::string& pref_name) { 363 const std::string& pref_name) {
364 return (store->GetValue(pref_name, NULL) == PrefStore::READ_OK); 364 return store->GetValue(pref_name, NULL);
365 } 365 }
366 366
367 // static 367 // static
368 base::StringValue* CredentialCacheService::PackCredential( 368 base::StringValue* CredentialCacheService::PackCredential(
369 const std::string& credential) { 369 const std::string& credential) {
370 // Do nothing for empty credentials. 370 // Do nothing for empty credentials.
371 if (credential.empty()) 371 if (credential.empty())
372 return base::Value::CreateStringValue(""); 372 return base::Value::CreateStringValue("");
373 373
374 browser_sync::ChromeEncryptor encryptor; 374 browser_sync::ChromeEncryptor encryptor;
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 !HasUserSignedOut() && 868 !HasUserSignedOut() &&
869 !alternate_google_services_username.empty() && 869 !alternate_google_services_username.empty() &&
870 !alternate_lsid.empty() && 870 !alternate_lsid.empty() &&
871 !alternate_sid.empty() && 871 !alternate_sid.empty() &&
872 !(alternate_encryption_bootstrap_token.empty() && 872 !(alternate_encryption_bootstrap_token.empty() &&
873 alternate_keystore_encryption_bootstrap_token.empty()) && 873 alternate_keystore_encryption_bootstrap_token.empty()) &&
874 !service->setup_in_progress(); 874 !service->setup_in_progress();
875 } 875 }
876 876
877 } // namespace syncer 877 } // namespace syncer
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_value_store.cc ('k') | chrome/service/service_process_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698