| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 void ShowPolicy(Browser* browser) { | 187 void ShowPolicy(Browser* browser) { |
| 188 ShowSingletonTab(browser, GURL(kChromeUIPolicyURL)); | 188 ShowSingletonTab(browser, GURL(kChromeUIPolicyURL)); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void ShowSlow(Browser* browser) { | 191 void ShowSlow(Browser* browser) { |
| 192 #if defined(OS_CHROMEOS) | 192 #if defined(OS_CHROMEOS) |
| 193 ShowSingletonTab(browser, GURL(kChromeUISlowURL)); | 193 ShowSingletonTab(browser, GURL(kChromeUISlowURL)); |
| 194 #endif | 194 #endif |
| 195 } | 195 } |
| 196 | 196 |
| 197 void ShowMemory(Browser* browser) { |
| 198 ShowSingletonTab(browser, GURL(kChromeUIMemoryURL)); |
| 199 } |
| 200 |
| 197 GURL GetSettingsUrl(const std::string& sub_page) { | 201 GURL GetSettingsUrl(const std::string& sub_page) { |
| 198 std::string url = std::string(kChromeUISettingsURL) + sub_page; | 202 std::string url = std::string(kChromeUISettingsURL) + sub_page; |
| 199 #if defined(OS_CHROMEOS) | 203 #if defined(OS_CHROMEOS) |
| 200 if (sub_page.find(kInternetOptionsSubPage, 0) != std::string::npos) { | 204 if (sub_page.find(kInternetOptionsSubPage, 0) != std::string::npos) { |
| 201 std::string::size_type loc = sub_page.find("?", 0); | 205 std::string::size_type loc = sub_page.find("?", 0); |
| 202 std::string network_page = | 206 std::string network_page = |
| 203 loc != std::string::npos ? sub_page.substr(loc) : std::string(); | 207 loc != std::string::npos ? sub_page.substr(loc) : std::string(); |
| 204 url = std::string(kChromeUISettingsURL) + network_page; | 208 url = std::string(kChromeUISettingsURL) + network_page; |
| 205 } | 209 } |
| 206 #endif | 210 #endif |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 original_profile, chrome::HOST_DESKTOP_TYPE_NATIVE)); | 323 original_profile, chrome::HOST_DESKTOP_TYPE_NATIVE)); |
| 320 browser = displayer->browser(); | 324 browser = displayer->browser(); |
| 321 } | 325 } |
| 322 | 326 |
| 323 NavigateToSingletonTab(browser, GURL(signin::GetPromoURL(source, false))); | 327 NavigateToSingletonTab(browser, GURL(signin::GetPromoURL(source, false))); |
| 324 DCHECK_GT(browser->tab_strip_model()->count(), 0); | 328 DCHECK_GT(browser->tab_strip_model()->count(), 0); |
| 325 } | 329 } |
| 326 } | 330 } |
| 327 | 331 |
| 328 } // namespace chrome | 332 } // namespace chrome |
| OLD | NEW |