| OLD | NEW |
| 1 // Copyright (c) 2010 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_flow.h" | 5 #include "chrome/browser/sync/sync_setup_flow.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 31 #endif | 31 #endif |
| 32 | 32 |
| 33 // XPath expression for finding specific iframes. | 33 // XPath expression for finding specific iframes. |
| 34 static const wchar_t* kLoginIFrameXPath = L"//iframe[@id='login']"; | 34 static const wchar_t* kLoginIFrameXPath = L"//iframe[@id='login']"; |
| 35 static const wchar_t* kChooseDataTypesIFrameXPath = | 35 static const wchar_t* kChooseDataTypesIFrameXPath = |
| 36 L"//iframe[@id='configure']"; | 36 L"//iframe[@id='configure']"; |
| 37 static const wchar_t* kPassphraseIFrameXPath = | 37 static const wchar_t* kPassphraseIFrameXPath = |
| 38 L"//iframe[@id='passphrase']"; | 38 L"//iframe[@id='passphrase']"; |
| 39 static const wchar_t* kDoneIframeXPath = L"//iframe[@id='done']"; | 39 static const wchar_t* kDoneIframeXPath = L"//iframe[@id='done']"; |
| 40 | 40 |
| 41 SyncConfiguration::SyncConfiguration() |
| 42 : sync_everything(false), |
| 43 use_secondary_passphrase(false) { |
| 44 } |
| 45 |
| 46 SyncConfiguration::~SyncConfiguration() {} |
| 47 |
| 41 void FlowHandler::RegisterMessages() { | 48 void FlowHandler::RegisterMessages() { |
| 42 dom_ui_->RegisterMessageCallback("SubmitAuth", | 49 dom_ui_->RegisterMessageCallback("SubmitAuth", |
| 43 NewCallback(this, &FlowHandler::HandleSubmitAuth)); | 50 NewCallback(this, &FlowHandler::HandleSubmitAuth)); |
| 44 dom_ui_->RegisterMessageCallback("Configure", | 51 dom_ui_->RegisterMessageCallback("Configure", |
| 45 NewCallback(this, &FlowHandler::HandleConfigure)); | 52 NewCallback(this, &FlowHandler::HandleConfigure)); |
| 46 dom_ui_->RegisterMessageCallback("Passphrase", | 53 dom_ui_->RegisterMessageCallback("Passphrase", |
| 47 NewCallback(this, &FlowHandler::HandlePassphraseEntry)); | 54 NewCallback(this, &FlowHandler::HandlePassphraseEntry)); |
| 48 dom_ui_->RegisterMessageCallback("PassphraseCancel", | 55 dom_ui_->RegisterMessageCallback("PassphraseCancel", |
| 49 NewCallback(this, &FlowHandler::HandlePassphraseCancel)); | 56 NewCallback(this, &FlowHandler::HandlePassphraseCancel)); |
| 50 dom_ui_->RegisterMessageCallback("FirstPassphrase", | 57 dom_ui_->RegisterMessageCallback("FirstPassphrase", |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 DisablePasswordSync(service_); | 780 DisablePasswordSync(service_); |
| 774 } else if (option == "google") { | 781 } else if (option == "google") { |
| 775 // Implicit passphrase already set up. | 782 // Implicit passphrase already set up. |
| 776 Advance(SyncSetupWizard::DONE); | 783 Advance(SyncSetupWizard::DONE); |
| 777 } | 784 } |
| 778 } | 785 } |
| 779 | 786 |
| 780 void SyncSetupFlow::OnGoToDashboard() { | 787 void SyncSetupFlow::OnGoToDashboard() { |
| 781 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); | 788 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); |
| 782 } | 789 } |
| OLD | NEW |