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

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

Issue 162443004: sync: final pieces to sync deferred initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 6 years, 10 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) 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 <vector> 5 #include <vector>
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 public: 95 public:
96 PasswordTestProfileSyncService( 96 PasswordTestProfileSyncService(
97 ProfileSyncComponentsFactory* factory, 97 ProfileSyncComponentsFactory* factory,
98 Profile* profile, 98 Profile* profile,
99 SigninManagerBase* signin, 99 SigninManagerBase* signin,
100 ProfileOAuth2TokenService* oauth2_token_service) 100 ProfileOAuth2TokenService* oauth2_token_service)
101 : TestProfileSyncService(factory, 101 : TestProfileSyncService(factory,
102 profile, 102 profile,
103 signin, 103 signin,
104 oauth2_token_service, 104 oauth2_token_service,
105 ProfileSyncService::AUTO_START) {} 105 browser_sync::AUTO_START) {}
106 106
107 virtual ~PasswordTestProfileSyncService() {} 107 virtual ~PasswordTestProfileSyncService() {}
108 108
109 virtual void OnPassphraseAccepted() OVERRIDE { 109 virtual void OnPassphraseAccepted() OVERRIDE {
110 if (!callback_.is_null()) 110 if (!callback_.is_null())
111 callback_.Run(); 111 callback_.Run();
112 112
113 TestProfileSyncService::OnPassphraseAccepted(); 113 TestProfileSyncService::OnPassphraseAccepted();
114 } 114 }
115 115
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 CreateRootHelper create_root(this, syncer::PASSWORDS); 668 CreateRootHelper create_root(this, syncer::PASSWORDS);
669 StartSyncService(create_root.callback(), 669 StartSyncService(create_root.callback(),
670 base::Bind(&AddPasswordEntriesCallback, this, sync_forms)); 670 base::Bind(&AddPasswordEntriesCallback, this, sync_forms));
671 671
672 std::vector<PasswordForm> new_sync_forms; 672 std::vector<PasswordForm> new_sync_forms;
673 GetPasswordEntriesFromSyncDB(&new_sync_forms); 673 GetPasswordEntriesFromSyncDB(&new_sync_forms);
674 674
675 EXPECT_EQ(1U, new_sync_forms.size()); 675 EXPECT_EQ(1U, new_sync_forms.size());
676 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0])); 676 EXPECT_TRUE(ComparePasswords(expected_forms[0], new_sync_forms[0]));
677 } 677 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.cc ('k') | chrome/browser/sync/profile_sync_service_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698