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

Side by Side Diff: chrome/browser/managed_mode/managed_user_registration_utility_unittest.cc

Issue 23129007: sync: Add GetAllSyncData to sync/api (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add GetAllSyncDataReturnError Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/threading/sequenced_worker_pool.h" 9 #include "base/threading/sequenced_worker_pool.h"
10 #include "chrome/browser/managed_mode/managed_user_refresh_token_fetcher.h" 10 #include "chrome/browser/managed_mode/managed_user_refresh_token_fetcher.h"
(...skipping 29 matching lines...) Expand all
40 class MockChangeProcessor : public SyncChangeProcessor { 40 class MockChangeProcessor : public SyncChangeProcessor {
41 public: 41 public:
42 MockChangeProcessor() {} 42 MockChangeProcessor() {}
43 virtual ~MockChangeProcessor() {} 43 virtual ~MockChangeProcessor() {}
44 44
45 // SyncChangeProcessor implementation: 45 // SyncChangeProcessor implementation:
46 virtual SyncError ProcessSyncChanges( 46 virtual SyncError ProcessSyncChanges(
47 const tracked_objects::Location& from_here, 47 const tracked_objects::Location& from_here,
48 const SyncChangeList& change_list) OVERRIDE; 48 const SyncChangeList& change_list) OVERRIDE;
49 49
50 virtual SyncDataList GetAllSyncData(syncer::ModelType type) const
51 OVERRIDE {
52 return SyncDataList();
53 }
54
50 const SyncChangeList& changes() const { return change_list_; } 55 const SyncChangeList& changes() const { return change_list_; }
51 56
52 private: 57 private:
53 SyncChangeList change_list_; 58 SyncChangeList change_list_;
54 }; 59 };
55 60
56 SyncError MockChangeProcessor::ProcessSyncChanges( 61 SyncError MockChangeProcessor::ProcessSyncChanges(
57 const tracked_objects::Location& from_here, 62 const tracked_objects::Location& from_here,
58 const SyncChangeList& change_list) { 63 const SyncChangeList& change_list) {
59 change_list_ = change_list; 64 change_list_ = change_list;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 ManagedUserRegistrationUtility::GenerateNewManagedUserId(), 275 ManagedUserRegistrationUtility::GenerateNewManagedUserId(),
271 ManagedUserRegistrationInfo(ASCIIToUTF16("Mike")), 276 ManagedUserRegistrationInfo(ASCIIToUTF16("Mike")),
272 GetRegistrationCallback()); 277 GetRegistrationCallback());
273 EXPECT_EQ(1u, prefs()->GetDictionary(prefs::kManagedUsers)->size()); 278 EXPECT_EQ(1u, prefs()->GetDictionary(prefs::kManagedUsers)->size());
274 service()->StopSyncing(MANAGED_USERS); 279 service()->StopSyncing(MANAGED_USERS);
275 EXPECT_EQ(0u, prefs()->GetDictionary(prefs::kManagedUsers)->size()); 280 EXPECT_EQ(0u, prefs()->GetDictionary(prefs::kManagedUsers)->size());
276 EXPECT_TRUE(received_callback()); 281 EXPECT_TRUE(received_callback());
277 EXPECT_EQ(GoogleServiceAuthError::REQUEST_CANCELED, error().state()); 282 EXPECT_EQ(GoogleServiceAuthError::REQUEST_CANCELED, error().state());
278 EXPECT_EQ(std::string(), token()); 283 EXPECT_EQ(std::string(), token());
279 } 284 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698