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

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

Issue 17610004: Revert 208315 "Make use of InvalidationService" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 return 0; 558 return 0;
559 return node.GetTotalNodeCount() - 1; 559 return node.GetTotalNodeCount() - 1;
560 } 560 }
561 561
562 void StartSyncService(const base::Closure& callback, 562 void StartSyncService(const base::Closure& callback,
563 bool will_fail_association, 563 bool will_fail_association,
564 syncer::ModelType type) { 564 syncer::ModelType type) {
565 AbstractAutofillFactory* factory = GetFactory(type); 565 AbstractAutofillFactory* factory = GetFactory(type);
566 SigninManagerBase* signin = 566 SigninManagerBase* signin =
567 SigninManagerFactory::GetForProfile(profile_.get()); 567 SigninManagerFactory::GetForProfile(profile_.get());
568 signin->SetAuthenticatedUsername("test_user@gmail.com"); 568 signin->SetAuthenticatedUsername("test_user");
569 sync_service_ = static_cast<TestProfileSyncService*>( 569 sync_service_ = static_cast<TestProfileSyncService*>(
570 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse( 570 ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(
571 profile_.get(), &TestProfileSyncService::BuildAutoStartAsyncInit)); 571 profile_.get(), &TestProfileSyncService::BuildAutoStartAsyncInit));
572 sync_service_->set_backend_init_callback(callback); 572 sync_service_->set_backend_init_callback(callback);
573 573
574 ProfileSyncComponentsFactoryMock* components = 574 ProfileSyncComponentsFactoryMock* components =
575 sync_service_->components_factory_mock(); 575 sync_service_->components_factory_mock();
576 DataTypeController* data_type_controller = 576 DataTypeController* data_type_controller =
577 factory->CreateDataTypeController(components, 577 factory->CreateDataTypeController(components,
578 profile_.get(), 578 profile_.get(),
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 std::vector<AutofillEntry> sync_entries; 1407 std::vector<AutofillEntry> sync_entries;
1408 std::vector<AutofillProfile> sync_profiles; 1408 std::vector<AutofillProfile> sync_profiles;
1409 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1409 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1410 EXPECT_EQ(3U, sync_entries.size()); 1410 EXPECT_EQ(3U, sync_entries.size());
1411 EXPECT_EQ(0U, sync_profiles.size()); 1411 EXPECT_EQ(0U, sync_profiles.size());
1412 for (size_t i = 0; i < sync_entries.size(); i++) { 1412 for (size_t i = 0; i < sync_entries.size(); i++) {
1413 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1413 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1414 << ", " << sync_entries[i].key().value(); 1414 << ", " << sync_entries[i].key().value();
1415 } 1415 }
1416 } 1416 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/sync/profile_sync_service.cc ('k') | trunk/src/chrome/browser/sync/profile_sync_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698