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

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. 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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 FilePath profile_file_path = profile->GetPath(); 515 FilePath profile_file_path = profile->GetPath();
516 ProfileMetrics::LogProfileSyncSignIn(profile_file_path); 516 ProfileMetrics::LogProfileSyncSignIn(profile_file_path);
517 } 517 }
518 } 518 }
519 519
520 void SyncSetupHandler::SetFlow(SyncSetupFlow* flow) { 520 void SyncSetupHandler::SetFlow(SyncSetupFlow* flow) {
521 flow_ = flow; 521 flow_ = flow;
522 } 522 }
523 523
524 void SyncSetupHandler::Focus() { 524 void SyncSetupHandler::Focus() {
525 web_ui()->GetWebContents()->GetRenderViewHost()->delegate()->Activate(); 525 web_ui()->GetWebContents()->GetRenderViewHost()->GetDelegate()->Activate();
526 } 526 }
527 527
528 void SyncSetupHandler::OnDidClosePage(const ListValue* args) { 528 void SyncSetupHandler::OnDidClosePage(const ListValue* args) {
529 CloseSyncSetup(); 529 CloseSyncSetup();
530 } 530 }
531 531
532 void SyncSetupHandler::HandleSubmitAuth(const ListValue* args) { 532 void SyncSetupHandler::HandleSubmitAuth(const ListValue* args) {
533 std::string json; 533 std::string json;
534 if (!args->GetString(0, &json)) { 534 if (!args->GetString(0, &json)) {
535 NOTREACHED() << "Could not read JSON argument"; 535 NOTREACHED() << "Could not read JSON argument";
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 if (i != current_profile_index && AreUserNamesEqual( 784 if (i != current_profile_index && AreUserNamesEqual(
785 cache.GetUserNameOfProfileAtIndex(i), username_utf16)) { 785 cache.GetUserNameOfProfileAtIndex(i), username_utf16)) {
786 *error_message = l10n_util::GetStringUTF16( 786 *error_message = l10n_util::GetStringUTF16(
787 IDS_SYNC_USER_NAME_IN_USE_ERROR); 787 IDS_SYNC_USER_NAME_IN_USE_ERROR);
788 return false; 788 return false;
789 } 789 }
790 } 790 }
791 791
792 return true; 792 return true;
793 } 793 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/login_ui_service.cc ('k') | chrome/browser/ui/webui/task_manager_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698