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

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

Issue 6312154: Remove wstring from RVH's run Javascript command.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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) 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_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"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 void FlowHandler::ShowFirstTimeDone(const std::wstring& user) { 350 void FlowHandler::ShowFirstTimeDone(const std::wstring& user) {
351 ExecuteJavascriptInIFrame(kDoneIframeXPath, 351 ExecuteJavascriptInIFrame(kDoneIframeXPath,
352 L"setShowFirstTimeSetupSummary();"); 352 L"setShowFirstTimeSetupSummary();");
353 ShowSetupDone(user); 353 ShowSetupDone(user);
354 } 354 }
355 355
356 void FlowHandler::ExecuteJavascriptInIFrame(const std::wstring& iframe_xpath, 356 void FlowHandler::ExecuteJavascriptInIFrame(const std::wstring& iframe_xpath,
357 const std::wstring& js) { 357 const std::wstring& js) {
358 if (dom_ui_) { 358 if (dom_ui_) {
359 RenderViewHost* rvh = dom_ui_->tab_contents()->render_view_host(); 359 RenderViewHost* rvh = dom_ui_->tab_contents()->render_view_host();
360 rvh->ExecuteJavascriptInWebFrame(iframe_xpath, js); 360 rvh->ExecuteJavascriptInWebFrame(WideToUTF16Hack(iframe_xpath),
361 WideToUTF16Hack(js));
361 } 362 }
362 } 363 }
363 364
364 // Use static Run method to get an instance. 365 // Use static Run method to get an instance.
365 SyncSetupFlow::SyncSetupFlow(SyncSetupWizard::State start_state, 366 SyncSetupFlow::SyncSetupFlow(SyncSetupWizard::State start_state,
366 SyncSetupWizard::State end_state, 367 SyncSetupWizard::State end_state,
367 const std::string& args, 368 const std::string& args,
368 SyncSetupFlowContainer* container, 369 SyncSetupFlowContainer* container,
369 ProfileSyncService* service) 370 ProfileSyncService* service)
370 : container_(container), 371 : container_(container),
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 DisablePasswordSync(service_); 777 DisablePasswordSync(service_);
777 } else if (option == "google") { 778 } else if (option == "google") {
778 // Implicit passphrase already set up. 779 // Implicit passphrase already set up.
779 Advance(SyncSetupWizard::DONE); 780 Advance(SyncSetupWizard::DONE);
780 } 781 }
781 } 782 }
782 783
783 void SyncSetupFlow::OnGoToDashboard() { 784 void SyncSetupFlow::OnGoToDashboard() {
784 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); 785 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate();
785 } 786 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698