| 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 void ShowPolicy(Browser* browser) { | 215 void ShowPolicy(Browser* browser) { |
| 216 ShowSingletonTab(browser, GURL(kChromeUIPolicyURL)); | 216 ShowSingletonTab(browser, GURL(kChromeUIPolicyURL)); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void ShowSlow(Browser* browser) { | 219 void ShowSlow(Browser* browser) { |
| 220 #if defined(OS_CHROMEOS) | 220 #if defined(OS_CHROMEOS) |
| 221 ShowSingletonTab(browser, GURL(kChromeUISlowURL)); | 221 ShowSingletonTab(browser, GURL(kChromeUISlowURL)); |
| 222 #endif | 222 #endif |
| 223 } | 223 } |
| 224 | 224 |
| 225 void ShowMemory(Browser* browser) { | |
| 226 ShowSingletonTab(browser, GURL(kChromeUIMemoryURL)); | |
| 227 } | |
| 228 | |
| 229 GURL GetSettingsUrl(const std::string& sub_page) { | 225 GURL GetSettingsUrl(const std::string& sub_page) { |
| 230 std::string url = std::string(kChromeUISettingsURL) + sub_page; | 226 std::string url = std::string(kChromeUISettingsURL) + sub_page; |
| 231 #if defined(OS_CHROMEOS) | 227 #if defined(OS_CHROMEOS) |
| 232 if (sub_page.find(kInternetOptionsSubPage, 0) != std::string::npos) { | 228 if (sub_page.find(kInternetOptionsSubPage, 0) != std::string::npos) { |
| 233 std::string::size_type loc = sub_page.find("?", 0); | 229 std::string::size_type loc = sub_page.find("?", 0); |
| 234 std::string network_page = | 230 std::string network_page = |
| 235 loc != std::string::npos ? sub_page.substr(loc) : std::string(); | 231 loc != std::string::npos ? sub_page.substr(loc) : std::string(); |
| 236 url = std::string(kChromeUISettingsURL) + network_page; | 232 url = std::string(kChromeUISettingsURL) + network_page; |
| 237 } | 233 } |
| 238 #endif | 234 #endif |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 SigninManagerFactory::GetForProfile(original_profile); | 400 SigninManagerFactory::GetForProfile(original_profile); |
| 405 DCHECK(manager->IsSigninAllowed()); | 401 DCHECK(manager->IsSigninAllowed()); |
| 406 if (manager->IsAuthenticated()) | 402 if (manager->IsAuthenticated()) |
| 407 ShowSettings(browser); | 403 ShowSettings(browser); |
| 408 else | 404 else |
| 409 ShowBrowserSignin(browser, access_point); | 405 ShowBrowserSignin(browser, access_point); |
| 410 } | 406 } |
| 411 #endif | 407 #endif |
| 412 | 408 |
| 413 } // namespace chrome | 409 } // namespace chrome |
| OLD | NEW |