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

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

Issue 11027070: Moved JsonPrefStore to use SequencedWorkerPool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 content::Source<TokenService>(token_service)); 684 content::Source<TokenService>(token_service));
685 registrar_.Add(this, 685 registrar_.Add(this,
686 chrome::NOTIFICATION_TOKENS_CLEARED, 686 chrome::NOTIFICATION_TOKENS_CLEARED,
687 content::Source<TokenService>(token_service)); 687 content::Source<TokenService>(token_service));
688 } 688 }
689 689
690 void CredentialCacheService::LookForCachedCredentialsInAlternateProfile() { 690 void CredentialCacheService::LookForCachedCredentialsInAlternateProfile() {
691 // Attempt to read cached credentials from the alternate profile. If no file 691 // Attempt to read cached credentials from the alternate profile. If no file
692 // exists, ReadPrefsAsync() will cause PREF_READ_ERROR_NO_FILE to be returned 692 // exists, ReadPrefsAsync() will cause PREF_READ_ERROR_NO_FILE to be returned
693 // after initialization is complete. 693 // after initialization is complete.
694 FilePath path = GetCredentialPathInAlternateProfile();
694 alternate_store_ = new JsonPrefStore( 695 alternate_store_ = new JsonPrefStore(
695 GetCredentialPathInAlternateProfile(), 696 path,
696 content::BrowserThread::GetMessageLoopProxyForThread( 697 content::BrowserThread::GetMessageLoopProxyForThread(
697 content::BrowserThread::FILE)); 698 content::BrowserThread::FILE));
698 alternate_store_observer_ = new AlternateStoreObserver(this, 699 alternate_store_observer_ = new AlternateStoreObserver(this,
699 alternate_store_); 700 alternate_store_);
700 alternate_store_->ReadPrefsAsync(NULL); 701 alternate_store_->ReadPrefsAsync(NULL);
701 } 702 }
702 703
703 bool CredentialCacheService::HasUserSignedOut() { 704 bool CredentialCacheService::HasUserSignedOut() {
704 DCHECK(local_store_.get()); 705 DCHECK(local_store_.get());
705 // If HasPref() is false, the user never signed in, since there are no 706 // If HasPref() is false, the user never signed in, since there are no
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 !HasUserSignedOut() && 868 !HasUserSignedOut() &&
868 !alternate_google_services_username.empty() && 869 !alternate_google_services_username.empty() &&
869 !alternate_lsid.empty() && 870 !alternate_lsid.empty() &&
870 !alternate_sid.empty() && 871 !alternate_sid.empty() &&
871 !(alternate_encryption_bootstrap_token.empty() && 872 !(alternate_encryption_bootstrap_token.empty() &&
872 alternate_keystore_encryption_bootstrap_token.empty()) && 873 alternate_keystore_encryption_bootstrap_token.empty()) &&
873 !service->setup_in_progress(); 874 !service->setup_in_progress();
874 } 875 }
875 876
876 } // namespace syncer 877 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698