| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 const syncable::ModelTypeSet& chosen_types) { | 53 const syncable::ModelTypeSet& chosen_types) { |
| 54 user_chose_data_types_ = true; | 54 user_chose_data_types_ = true; |
| 55 chosen_data_types_ = chosen_types; | 55 chosen_data_types_ = chosen_types; |
| 56 } | 56 } |
| 57 | 57 |
| 58 virtual void OnUserCancelledDialog() { | 58 virtual void OnUserCancelledDialog() { |
| 59 user_cancelled_dialog_ = true; | 59 user_cancelled_dialog_ = true; |
| 60 } | 60 } |
| 61 | 61 |
| 62 virtual void SetPassphrase(const std::string& passphrase, | 62 virtual void SetPassphrase(const std::string& passphrase, |
| 63 bool is_explicit) { | 63 bool is_explicit, |
| 64 bool is_creation) { |
| 64 passphrase_ = passphrase; | 65 passphrase_ = passphrase; |
| 65 } | 66 } |
| 66 | 67 |
| 67 virtual string16 GetAuthenticatedUsername() const { | 68 virtual string16 GetAuthenticatedUsername() const { |
| 68 return UTF8ToUTF16(username_); | 69 return UTF8ToUTF16(username_); |
| 69 } | 70 } |
| 70 | 71 |
| 71 void set_auth_state(const std::string& last_email, | 72 void set_auth_state(const std::string& last_email, |
| 72 const AuthError& error) { | 73 const AuthError& error) { |
| 73 last_attempted_user_email_ = last_email; | 74 last_attempted_user_email_ = last_email; |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 int error = -1; | 535 int error = -1; |
| 535 dialog_args.GetInteger("error", &error); | 536 dialog_args.GetInteger("error", &error); |
| 536 EXPECT_EQ(static_cast<int>(AuthError::INVALID_GAIA_CREDENTIALS), error); | 537 EXPECT_EQ(static_cast<int>(AuthError::INVALID_GAIA_CREDENTIALS), error); |
| 537 service_->set_auth_state(kTestUser, AuthError::None()); | 538 service_->set_auth_state(kTestUser, AuthError::None()); |
| 538 | 539 |
| 539 wizard_->Step(SyncSetupWizard::GAIA_SUCCESS); | 540 wizard_->Step(SyncSetupWizard::GAIA_SUCCESS); |
| 540 EXPECT_TRUE(test_window_->TestAndResetWasShowHTMLDialogCalled()); | 541 EXPECT_TRUE(test_window_->TestAndResetWasShowHTMLDialogCalled()); |
| 541 } | 542 } |
| 542 | 543 |
| 543 #undef SKIP_TEST_ON_MACOSX | 544 #undef SKIP_TEST_ON_MACOSX |
| OLD | NEW |