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

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

Issue 130813003: Create signin component and componentize TokenWebData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 189
190 template<> 190 template<>
191 syncer::ModelType GetModelType<AutofillProfile>() { 191 syncer::ModelType GetModelType<AutofillProfile>() {
192 return syncer::AUTOFILL_PROFILE; 192 return syncer::AUTOFILL_PROFILE;
193 } 193 }
194 194
195 class TokenWebDataServiceFake : public TokenWebData { 195 class TokenWebDataServiceFake : public TokenWebData {
196 public: 196 public:
197 TokenWebDataServiceFake() 197 TokenWebDataServiceFake()
198 : TokenWebData() { 198 : TokenWebData(
199 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
200 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)) {
199 } 201 }
200 202
201 virtual bool IsDatabaseLoaded() OVERRIDE { 203 virtual bool IsDatabaseLoaded() OVERRIDE {
202 return true; 204 return true;
203 } 205 }
204 206
205 virtual WebDataService::Handle GetAllTokens( 207 virtual WebDataService::Handle GetAllTokens(
206 WebDataServiceConsumer* consumer) OVERRIDE { 208 WebDataServiceConsumer* consumer) OVERRIDE {
207 // TODO(tim): It would be nice if WebDataService was injected on 209 // TODO(tim): It would be nice if WebDataService was injected on
208 // construction of ProfileOAuth2TokenService rather than fetched by 210 // construction of ProfileOAuth2TokenService rather than fetched by
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 std::vector<AutofillEntry> sync_entries; 1414 std::vector<AutofillEntry> sync_entries;
1413 std::vector<AutofillProfile> sync_profiles; 1415 std::vector<AutofillProfile> sync_profiles;
1414 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1416 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1415 EXPECT_EQ(3U, sync_entries.size()); 1417 EXPECT_EQ(3U, sync_entries.size());
1416 EXPECT_EQ(0U, sync_profiles.size()); 1418 EXPECT_EQ(0U, sync_profiles.size());
1417 for (size_t i = 0; i < sync_entries.size(); i++) { 1419 for (size_t i = 0; i < sync_entries.size(); i++) {
1418 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1420 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1419 << ", " << sync_entries[i].key().value(); 1421 << ", " << sync_entries[i].key().value();
1420 } 1422 }
1421 } 1423 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/mutable_profile_oauth2_token_service_unittest.cc ('k') | chrome/browser/webdata/token_service_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698