| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |