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

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

Issue 8919021: [Sync] Rename ModelEnumSet to ModelTypeSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « chrome/browser/sync/sync_setup_flow.cc ('k') | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/sync_setup_wizard.h" 5 #include "chrome/browser/sync/sync_setup_wizard.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual void OnUserSubmittedAuth(const std::string& username, 74 virtual void OnUserSubmittedAuth(const std::string& username,
75 const std::string& password, 75 const std::string& password,
76 const std::string& captcha, 76 const std::string& captcha,
77 const std::string& access_code) { 77 const std::string& access_code) {
78 username_ = username; 78 username_ = username;
79 password_ = password; 79 password_ = password;
80 captcha_ = captcha; 80 captcha_ = captcha;
81 } 81 }
82 82
83 virtual void OnUserChoseDatatypes(bool sync_everything, 83 virtual void OnUserChoseDatatypes(bool sync_everything,
84 syncable::ModelEnumSet chosen_types) { 84 syncable::ModelTypeSet chosen_types) {
85 user_chose_data_types_ = true; 85 user_chose_data_types_ = true;
86 chosen_data_types_ = chosen_types; 86 chosen_data_types_ = chosen_types;
87 } 87 }
88 88
89 virtual void OnUserCancelledDialog() { 89 virtual void OnUserCancelledDialog() {
90 user_cancelled_dialog_ = true; 90 user_cancelled_dialog_ = true;
91 } 91 }
92 92
93 virtual void SetPassphrase(const std::string& passphrase, 93 virtual void SetPassphrase(const std::string& passphrase,
94 bool is_explicit) { 94 bool is_explicit) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 std::string username_; 164 std::string username_;
165 std::string password_; 165 std::string password_;
166 std::string captcha_; 166 std::string captcha_;
167 bool user_cancelled_dialog_; 167 bool user_cancelled_dialog_;
168 bool user_chose_data_types_; 168 bool user_chose_data_types_;
169 bool keep_everything_synced_; 169 bool keep_everything_synced_;
170 bool is_using_secondary_passphrase_; 170 bool is_using_secondary_passphrase_;
171 bool encrypt_everything_; 171 bool encrypt_everything_;
172 syncable::ModelEnumSet chosen_data_types_; 172 syncable::ModelTypeSet chosen_data_types_;
173 std::string passphrase_; 173 std::string passphrase_;
174 174
175 private: 175 private:
176 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceForWizardTest); 176 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceForWizardTest);
177 }; 177 };
178 178
179 class TestingProfileWithSyncService : public TestingProfile { 179 class TestingProfileWithSyncService : public TestingProfile {
180 public: 180 public:
181 TestingProfileWithSyncService() { 181 TestingProfileWithSyncService() {
182 sync_service_.reset(new ProfileSyncServiceForWizardTest(&factory_, this)); 182 sync_service_.reset(new ProfileSyncServiceForWizardTest(&factory_, this));
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 614
615 service_->set_last_auth_error( 615 service_->set_last_auth_error(
616 AuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE)); 616 AuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE));
617 wizard_->Step(SyncSetupWizard::NONFATAL_ERROR); 617 wizard_->Step(SyncSetupWizard::NONFATAL_ERROR);
618 AttachSyncSetupHandler(); 618 AttachSyncSetupHandler();
619 EXPECT_EQ(SyncSetupWizard::GAIA_LOGIN, flow_->current_state_); 619 EXPECT_EQ(SyncSetupWizard::GAIA_LOGIN, flow_->current_state_);
620 EXPECT_EQ(SyncSetupWizard::DONE, flow_->end_state_); 620 EXPECT_EQ(SyncSetupWizard::DONE, flow_->end_state_);
621 CloseSetupUI(); 621 CloseSetupUI();
622 EXPECT_FALSE(wizard_->IsVisible()); 622 EXPECT_FALSE(wizard_->IsVisible());
623 } 623 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_setup_flow.cc ('k') | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698