| OLD | NEW |
| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 ShowSettingsSubPage(browser, kPasswordManagerSubPage); | 281 ShowSettingsSubPage(browser, kPasswordManagerSubPage); |
| 282 } | 282 } |
| 283 | 283 |
| 284 void ShowImportDialog(Browser* browser) { | 284 void ShowImportDialog(Browser* browser) { |
| 285 content::RecordAction(UserMetricsAction("Import_ShowDlg")); | 285 content::RecordAction(UserMetricsAction("Import_ShowDlg")); |
| 286 ShowSettingsSubPage(browser, kImportDataSubPage); | 286 ShowSettingsSubPage(browser, kImportDataSubPage); |
| 287 } | 287 } |
| 288 | 288 |
| 289 void ShowAboutChrome(Browser* browser) { | 289 void ShowAboutChrome(Browser* browser) { |
| 290 content::RecordAction(UserMetricsAction("AboutChrome")); | 290 content::RecordAction(UserMetricsAction("AboutChrome")); |
| 291 if (::switches::SettingsWindowEnabled()) { |
| 292 SettingsWindowManager::GetInstance()->ShowChromePageForProfile( |
| 293 browser->profile(), GURL(kChromeUIUberURL)); |
| 294 return; |
| 295 } |
| 291 NavigateParams params( | 296 NavigateParams params( |
| 292 GetSingletonTabNavigateParams(browser, GURL(kChromeUIUberURL))); | 297 GetSingletonTabNavigateParams(browser, GURL(kChromeUIUberURL))); |
| 293 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; | 298 params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE; |
| 294 ShowSingletonTabOverwritingNTP(browser, params); | 299 ShowSingletonTabOverwritingNTP(browser, params); |
| 295 } | 300 } |
| 296 | 301 |
| 297 void ShowSearchEngineSettings(Browser* browser) { | 302 void ShowSearchEngineSettings(Browser* browser) { |
| 298 content::RecordAction(UserMetricsAction("EditSearchEngines")); | 303 content::RecordAction(UserMetricsAction("EditSearchEngines")); |
| 299 ShowSettingsSubPage(browser, kSearchEnginesSubPage); | 304 ShowSettingsSubPage(browser, kSearchEnginesSubPage); |
| 300 } | 305 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 317 original_profile, chrome::HOST_DESKTOP_TYPE_NATIVE)); | 322 original_profile, chrome::HOST_DESKTOP_TYPE_NATIVE)); |
| 318 browser = displayer->browser(); | 323 browser = displayer->browser(); |
| 319 } | 324 } |
| 320 | 325 |
| 321 NavigateToSingletonTab(browser, GURL(signin::GetPromoURL(source, false))); | 326 NavigateToSingletonTab(browser, GURL(signin::GetPromoURL(source, false))); |
| 322 DCHECK_GT(browser->tab_strip_model()->count(), 0); | 327 DCHECK_GT(browser->tab_strip_model()->count(), 0); |
| 323 } | 328 } |
| 324 } | 329 } |
| 325 | 330 |
| 326 } // namespace chrome | 331 } // namespace chrome |
| OLD | NEW |