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

Side by Side Diff: chrome/browser/sync/engine/syncapi.cc

Issue 7466024: [Sync] Support receiving early passphrase required information in Sync UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Stray char Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/engine/syncapi.h" 5 #include "chrome/browser/sync/engine/syncapi.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <bitset> 8 #include <bitset>
9 #include <iomanip> 9 #include <iomanip>
10 #include <list> 10 #include <list>
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 ObserverList<SyncManager::Observer> temp_obs_list; 1959 ObserverList<SyncManager::Observer> temp_obs_list;
1960 CopyObservers(&temp_obs_list); 1960 CopyObservers(&temp_obs_list);
1961 FOR_EACH_OBSERVER(SyncManager::Observer, temp_obs_list, 1961 FOR_EACH_OBSERVER(SyncManager::Observer, temp_obs_list,
1962 OnAuthError(AuthError(AuthError::INVALID_GAIA_CREDENTIALS))); 1962 OnAuthError(AuthError(AuthError::INVALID_GAIA_CREDENTIALS)));
1963 } 1963 }
1964 1964
1965 void SyncManager::SyncInternal::SetPassphrase( 1965 void SyncManager::SyncInternal::SetPassphrase(
1966 const std::string& passphrase, bool is_explicit) { 1966 const std::string& passphrase, bool is_explicit) {
1967 // We do not accept empty passphrases. 1967 // We do not accept empty passphrases.
1968 if (passphrase.empty()) { 1968 if (passphrase.empty()) {
1969 VLOG(1) << "Rejecting empty passphrase."; 1969 NOTREACHED() << "Rejecting empty passphrase.";
1970 ObserverList<SyncManager::Observer> temp_obs_list; 1970 ObserverList<SyncManager::Observer> temp_obs_list;
1971 CopyObservers(&temp_obs_list); 1971 CopyObservers(&temp_obs_list);
1972 FOR_EACH_OBSERVER(SyncManager::Observer, temp_obs_list, 1972 FOR_EACH_OBSERVER(SyncManager::Observer, temp_obs_list,
1973 OnPassphraseRequired(sync_api::REASON_SET_PASSPHRASE_FAILED)); 1973 OnPassphraseRequired(sync_api::REASON_SET_PASSPHRASE_FAILED));
1974 return; 1974 return;
1975 } 1975 }
1976 1976
1977 // All accesses to the cryptographer are protected by a transaction. 1977 // All accesses to the cryptographer are protected by a transaction.
1978 WriteTransaction trans(FROM_HERE, GetUserShare()); 1978 WriteTransaction trans(FROM_HERE, GetUserShare());
1979 Cryptographer* cryptographer = trans.GetCryptographer(); 1979 Cryptographer* cryptographer = trans.GetCryptographer();
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 void SyncManager::TriggerOnIncomingNotificationForTest( 3024 void SyncManager::TriggerOnIncomingNotificationForTest(
3025 const syncable::ModelTypeBitSet& model_types) { 3025 const syncable::ModelTypeBitSet& model_types) {
3026 syncable::ModelTypePayloadMap model_types_with_payloads = 3026 syncable::ModelTypePayloadMap model_types_with_payloads =
3027 syncable::ModelTypePayloadMapFromBitSet(model_types, 3027 syncable::ModelTypePayloadMapFromBitSet(model_types,
3028 std::string()); 3028 std::string());
3029 3029
3030 data_->OnIncomingNotification(model_types_with_payloads); 3030 data_->OnIncomingNotification(model_types_with_payloads);
3031 } 3031 }
3032 3032
3033 } // namespace sync_api 3033 } // namespace sync_api
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698