| OLD | NEW |
| 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 "chrome/browser/ui/webui/options/sync_setup_handler.h" | 5 #include "chrome/browser/ui/webui/options/sync_setup_handler.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 const std::vector<const base::Value*>& args) override {} | 220 const std::vector<const base::Value*>& args) override {} |
| 221 | 221 |
| 222 class CallData { | 222 class CallData { |
| 223 public: | 223 public: |
| 224 CallData() : arg1(NULL), arg2(NULL) {} | 224 CallData() : arg1(NULL), arg2(NULL) {} |
| 225 std::string function_name; | 225 std::string function_name; |
| 226 base::Value* arg1; | 226 base::Value* arg1; |
| 227 base::Value* arg2; | 227 base::Value* arg2; |
| 228 }; | 228 }; |
| 229 const std::vector<CallData>& call_data() { return call_data_; } | 229 const std::vector<CallData>& call_data() { return call_data_; } |
| 230 |
| 230 private: | 231 private: |
| 231 std::vector<CallData> call_data_; | 232 std::vector<CallData> call_data_; |
| 232 base::string16 temp_string_; | 233 base::string16 temp_string_; |
| 233 }; | 234 }; |
| 234 | 235 |
| 235 class TestingSyncSetupHandler : public SyncSetupHandler { | 236 class TestingSyncSetupHandler : public SyncSetupHandler { |
| 236 public: | 237 public: |
| 237 TestingSyncSetupHandler(content::WebUI* web_ui, Profile* profile) | 238 TestingSyncSetupHandler(content::WebUI* web_ui, Profile* profile) |
| 238 : SyncSetupHandler(NULL), | 239 : profile_(profile) { |
| 239 profile_(profile) { | |
| 240 set_web_ui(web_ui); | 240 set_web_ui(web_ui); |
| 241 } | 241 } |
| 242 ~TestingSyncSetupHandler() override { set_web_ui(NULL); } | 242 ~TestingSyncSetupHandler() override { set_web_ui(NULL); } |
| 243 | 243 |
| 244 void FocusUI() override {} | 244 void FocusUI() override {} |
| 245 | 245 |
| 246 Profile* GetProfile() const override { return profile_; } | 246 Profile* GetProfile() const override { return profile_; } |
| 247 | 247 |
| 248 using SyncSetupHandler::is_configuring_sync; | 248 using SyncSetupHandler::is_configuring_sync; |
| 249 | 249 |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 WillRepeatedly(Return(false)); | 1084 WillRepeatedly(Return(false)); |
| 1085 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); | 1085 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); |
| 1086 EXPECT_CALL(*mock_pss_, OnUserChoseDatatypes(true, _)); | 1086 EXPECT_CALL(*mock_pss_, OnUserChoseDatatypes(true, _)); |
| 1087 handler_->HandleConfigure(&list_args); | 1087 handler_->HandleConfigure(&list_args); |
| 1088 | 1088 |
| 1089 // Ensure that we navigated to the "done" state since we don't need a | 1089 // Ensure that we navigated to the "done" state since we don't need a |
| 1090 // passphrase. | 1090 // passphrase. |
| 1091 ExpectDone(); | 1091 ExpectDone(); |
| 1092 } | 1092 } |
| 1093 | 1093 |
| OLD | NEW |