| 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/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "chrome/browser/download/download_shelf.h" | 10 #include "chrome/browser/download/download_shelf.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 default: | 140 default: |
| 141 NOTREACHED() << "Unhandled help source " << source; | 141 NOTREACHED() << "Unhandled help source " << source; |
| 142 } | 142 } |
| 143 ShowSingletonTab(browser, url); | 143 ShowSingletonTab(browser, url); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void ShowPolicy(Browser* browser) { | 146 void ShowPolicy(Browser* browser) { |
| 147 ShowSingletonTab(browser, GURL(kChromeUIPolicyURL)); | 147 ShowSingletonTab(browser, GURL(kChromeUIPolicyURL)); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void ShowSlow(Browser* browser) { |
| 151 #if defined(OS_CHROMEOS) |
| 152 ShowSingletonTab(browser, GURL(kChromeUISlowURL)); |
| 153 #endif |
| 154 } |
| 155 |
| 150 void ShowSettings(Browser* browser) { | 156 void ShowSettings(Browser* browser) { |
| 151 content::RecordAction(UserMetricsAction("ShowOptions")); | 157 content::RecordAction(UserMetricsAction("ShowOptions")); |
| 152 ShowSettingsSubPage(browser, std::string()); | 158 ShowSettingsSubPage(browser, std::string()); |
| 153 } | 159 } |
| 154 | 160 |
| 155 void ShowSettingsSubPage(Browser* browser, const std::string& sub_page) { | 161 void ShowSettingsSubPage(Browser* browser, const std::string& sub_page) { |
| 156 std::string url = std::string(kChromeUISettingsURL) + sub_page; | 162 std::string url = std::string(kChromeUISettingsURL) + sub_page; |
| 157 #if defined(OS_CHROMEOS) | 163 #if defined(OS_CHROMEOS) |
| 158 if (sub_page.find(kInternetOptionsSubPage, 0) != std::string::npos) { | 164 if (sub_page.find(kInternetOptionsSubPage, 0) != std::string::npos) { |
| 159 std::string::size_type loc = sub_page.find("?", 0); | 165 std::string::size_type loc = sub_page.find("?", 0); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 const std::string& service, | 238 const std::string& service, |
| 233 const GURL& continue_url) { | 239 const GURL& continue_url) { |
| 234 GURL url(GaiaUrls::GetInstance()->service_login_url()); | 240 GURL url(GaiaUrls::GetInstance()->service_login_url()); |
| 235 url = net::AppendQueryParameter(url, "service", service); | 241 url = net::AppendQueryParameter(url, "service", service); |
| 236 if (continue_url.is_valid()) | 242 if (continue_url.is_valid()) |
| 237 url = net::AppendQueryParameter(url, "continue", continue_url.spec()); | 243 url = net::AppendQueryParameter(url, "continue", continue_url.spec()); |
| 238 NavigateToSingletonTab(browser, url); | 244 NavigateToSingletonTab(browser, url); |
| 239 } | 245 } |
| 240 | 246 |
| 241 } // namespace chrome | 247 } // namespace chrome |
| OLD | NEW |