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

Side by Side Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR, fix a weird runtime issue. Created 8 years, 9 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) 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/sync_setup_handler.h" 5 #include "chrome/browser/ui/webui/sync_setup_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 FilePath profile_file_path = profile->GetPath(); 519 FilePath profile_file_path = profile->GetPath();
520 ProfileMetrics::LogProfileSyncSignIn(profile_file_path); 520 ProfileMetrics::LogProfileSyncSignIn(profile_file_path);
521 } 521 }
522 } 522 }
523 523
524 void SyncSetupHandler::SetFlow(SyncSetupFlow* flow) { 524 void SyncSetupHandler::SetFlow(SyncSetupFlow* flow) {
525 flow_ = flow; 525 flow_ = flow;
526 } 526 }
527 527
528 void SyncSetupHandler::Focus() { 528 void SyncSetupHandler::Focus() {
529 web_ui()->GetWebContents()->GetRenderViewHost()->delegate()->Activate(); 529 web_ui()->GetWebContents()->GetRenderViewHost()->GetDelegate()->Activate();
530 } 530 }
531 531
532 void SyncSetupHandler::OnDidClosePage(const ListValue* args) { 532 void SyncSetupHandler::OnDidClosePage(const ListValue* args) {
533 CloseSyncSetup(); 533 CloseSyncSetup();
534 } 534 }
535 535
536 void SyncSetupHandler::HandleSubmitAuth(const ListValue* args) { 536 void SyncSetupHandler::HandleSubmitAuth(const ListValue* args) {
537 std::string json; 537 std::string json;
538 if (!args->GetString(0, &json)) { 538 if (!args->GetString(0, &json)) {
539 NOTREACHED() << "Could not read JSON argument"; 539 NOTREACHED() << "Could not read JSON argument";
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 if (i != current_profile_index && AreUserNamesEqual( 788 if (i != current_profile_index && AreUserNamesEqual(
789 cache.GetUserNameOfProfileAtIndex(i), username_utf16)) { 789 cache.GetUserNameOfProfileAtIndex(i), username_utf16)) {
790 *error_message = l10n_util::GetStringUTF16( 790 *error_message = l10n_util::GetStringUTF16(
791 IDS_SYNC_USER_NAME_IN_USE_ERROR); 791 IDS_SYNC_USER_NAME_IN_USE_ERROR);
792 return false; 792 return false;
793 } 793 }
794 } 794 }
795 795
796 return true; 796 return true;
797 } 797 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698