| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 } else if (sub_page == chrome::kBluetoothSubPage) { | 312 } else if (sub_page == chrome::kBluetoothSubPage) { |
| 313 sub_page_path = GenerateContentSettingsSearchQueryPath( | 313 sub_page_path = GenerateContentSettingsSearchQueryPath( |
| 314 IDS_OPTIONS_SETTINGS_SECTION_TITLE_BLUETOOTH); | 314 IDS_OPTIONS_SETTINGS_SECTION_TITLE_BLUETOOTH); |
| 315 } else if (sub_page == chrome::kDateTimeSubPage) { | 315 } else if (sub_page == chrome::kDateTimeSubPage) { |
| 316 sub_page_path = GenerateContentSettingsSearchQueryPath( | 316 sub_page_path = GenerateContentSettingsSearchQueryPath( |
| 317 IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); | 317 IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); |
| 318 } else if (sub_page == chrome::kStylusSubPage || | 318 } else if (sub_page == chrome::kStylusSubPage || |
| 319 sub_page == chrome::kPowerSubPage) { | 319 sub_page == chrome::kPowerSubPage) { |
| 320 sub_page_path += "-overlay"; | 320 sub_page_path += "-overlay"; |
| 321 } | 321 } |
| 322 } else { | |
| 323 if (sub_page == chrome::kPowerSubPage) { | |
| 324 // TODO(stevenjbj/derat): Remove this once we have a 'power' subpage, | |
| 325 // crbug.com/633455. | |
| 326 sub_page_path = "device"; | |
| 327 } | |
| 328 } | 322 } |
| 329 #endif | 323 #endif |
| 330 | 324 |
| 331 if (::switches::SettingsWindowEnabled()) { | 325 if (::switches::SettingsWindowEnabled()) { |
| 332 base::RecordAction(base::UserMetricsAction("ShowOptions")); | 326 base::RecordAction(base::UserMetricsAction("ShowOptions")); |
| 333 SettingsWindowManager::GetInstance()->ShowChromePageForProfile( | 327 SettingsWindowManager::GetInstance()->ShowChromePageForProfile( |
| 334 profile, GetSettingsUrl(sub_page_path)); | 328 profile, GetSettingsUrl(sub_page_path)); |
| 335 return; | 329 return; |
| 336 } | 330 } |
| 337 Browser* browser = chrome::FindTabbedBrowser(profile, false); | 331 Browser* browser = chrome::FindTabbedBrowser(profile, false); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 SigninManagerFactory::GetForProfile(original_profile); | 450 SigninManagerFactory::GetForProfile(original_profile); |
| 457 DCHECK(manager->IsSigninAllowed()); | 451 DCHECK(manager->IsSigninAllowed()); |
| 458 if (manager->IsAuthenticated()) | 452 if (manager->IsAuthenticated()) |
| 459 ShowSettings(browser); | 453 ShowSettings(browser); |
| 460 else | 454 else |
| 461 ShowBrowserSignin(browser, access_point); | 455 ShowBrowserSignin(browser, access_point); |
| 462 } | 456 } |
| 463 #endif | 457 #endif |
| 464 | 458 |
| 465 } // namespace chrome | 459 } // namespace chrome |
| OLD | NEW |