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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_starter.cc

Issue 178863002: Implement settings in a widnow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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/sync/one_click_signin_sync_starter.h" 5 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 10
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 void OneClickSigninSyncStarter::FinishProfileSyncServiceSetup() { 505 void OneClickSigninSyncStarter::FinishProfileSyncServiceSetup() {
506 ProfileSyncService* service = 506 ProfileSyncService* service =
507 ProfileSyncServiceFactory::GetForProfile(profile_); 507 ProfileSyncServiceFactory::GetForProfile(profile_);
508 if (service) 508 if (service)
509 service->SetSetupInProgress(false); 509 service->SetSetupInProgress(false);
510 } 510 }
511 511
512 void OneClickSigninSyncStarter::ShowSettingsPageInWebContents( 512 void OneClickSigninSyncStarter::ShowSettingsPageInWebContents(
513 content::WebContents* contents, 513 content::WebContents* contents,
514 const std::string& sub_page) { 514 const std::string& sub_page) {
515 std::string url = std::string(chrome::kChromeUISettingsURL) + sub_page; 515 GURL url = chrome::GetSettingsUrl(sub_page);
516 content::OpenURLParams params(GURL(url), 516 content::OpenURLParams params(url,
517 content::Referrer(), 517 content::Referrer(),
518 CURRENT_TAB, 518 CURRENT_TAB,
519 content::PAGE_TRANSITION_AUTO_TOPLEVEL, 519 content::PAGE_TRANSITION_AUTO_TOPLEVEL,
520 false); 520 false);
521 contents->OpenURL(params); 521 contents->OpenURL(params);
522 522
523 // Activate the tab. 523 // Activate the tab.
524 Browser* browser = chrome::FindBrowserWithWebContents(contents); 524 Browser* browser = chrome::FindBrowserWithWebContents(contents);
525 int content_index = 525 int content_index =
526 browser->tab_strip_model()->GetIndexOfWebContents(contents); 526 browser->tab_strip_model()->GetIndexOfWebContents(contents);
527 browser->tab_strip_model()->ActivateTabAt(content_index, 527 browser->tab_strip_model()->ActivateTabAt(content_index,
528 false /* user_gesture */); 528 false /* user_gesture */);
529 } 529 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698