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

Side by Side Diff: chrome/browser/ui/chrome_pages.cc

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl Created 4 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
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/chrome_pages.h" 5 #include "chrome/browser/ui/chrome_pages.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 278 }
279 279
280 void ShowSettingsSubPageForProfile(Profile* profile, 280 void ShowSettingsSubPageForProfile(Profile* profile,
281 const std::string& sub_page) { 281 const std::string& sub_page) {
282 if (::switches::SettingsWindowEnabled()) { 282 if (::switches::SettingsWindowEnabled()) {
283 content::RecordAction(base::UserMetricsAction("ShowOptions")); 283 content::RecordAction(base::UserMetricsAction("ShowOptions"));
284 SettingsWindowManager::GetInstance()->ShowChromePageForProfile( 284 SettingsWindowManager::GetInstance()->ShowChromePageForProfile(
285 profile, GetSettingsUrl(sub_page)); 285 profile, GetSettingsUrl(sub_page));
286 return; 286 return;
287 } 287 }
288 Browser* browser = 288 Browser* browser = chrome::FindTabbedBrowser(profile, false);
289 chrome::FindTabbedBrowser(profile, false, HOST_DESKTOP_TYPE_NATIVE);
290 if (!browser) { 289 if (!browser) {
291 browser = new Browser( 290 browser = new Browser(
292 Browser::CreateParams(profile, chrome::HOST_DESKTOP_TYPE_NATIVE)); 291 Browser::CreateParams(profile, chrome::HOST_DESKTOP_TYPE_NATIVE));
293 } 292 }
294 ShowSettingsSubPageInTabbedBrowser(browser, sub_page); 293 ShowSettingsSubPageInTabbedBrowser(browser, sub_page);
295 } 294 }
296 295
297 void ShowSettingsSubPageInTabbedBrowser(Browser* browser, 296 void ShowSettingsSubPageInTabbedBrowser(Browser* browser,
298 const std::string& sub_page) { 297 const std::string& sub_page) {
299 content::RecordAction(UserMetricsAction("ShowOptions")); 298 content::RecordAction(UserMetricsAction("ShowOptions"));
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 SigninManagerFactory::GetForProfile(original_profile); 410 SigninManagerFactory::GetForProfile(original_profile);
412 DCHECK(manager->IsSigninAllowed()); 411 DCHECK(manager->IsSigninAllowed());
413 if (manager->IsAuthenticated()) 412 if (manager->IsAuthenticated())
414 ShowSettings(browser); 413 ShowSettings(browser);
415 else 414 else
416 ShowBrowserSignin(browser, access_point); 415 ShowBrowserSignin(browser, access_point);
417 } 416 }
418 #endif 417 #endif
419 418
420 } // namespace chrome 419 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698