| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 void ShowPolicy(Browser* browser) { | 208 void ShowPolicy(Browser* browser) { |
| 209 ShowSingletonTab(browser, GURL(kChromeUIPolicyURL)); | 209 ShowSingletonTab(browser, GURL(kChromeUIPolicyURL)); |
| 210 } | 210 } |
| 211 | 211 |
| 212 void ShowSlow(Browser* browser) { | 212 void ShowSlow(Browser* browser) { |
| 213 #if defined(OS_CHROMEOS) | 213 #if defined(OS_CHROMEOS) |
| 214 ShowSingletonTab(browser, GURL(kChromeUISlowURL)); | 214 ShowSingletonTab(browser, GURL(kChromeUISlowURL)); |
| 215 #endif | 215 #endif |
| 216 } | 216 } |
| 217 | 217 |
| 218 std::string GetLegacySettingsHost() { |
| 219 return kChromeUISettingsLegacyHost; |
| 220 } |
| 221 |
| 222 std::string GetMdSettingsHost() { |
| 223 return kChromeUIMdSettingsHost; |
| 224 } |
| 225 |
| 218 GURL GetSettingsUrl(const std::string& sub_page) { | 226 GURL GetSettingsUrl(const std::string& sub_page) { |
| 219 std::string url = std::string(kChromeUISettingsURL) + sub_page; | 227 std::string url = std::string(kChromeUISettingsURL) + sub_page; |
| 220 #if defined(OS_CHROMEOS) | 228 #if defined(OS_CHROMEOS) |
| 221 if (sub_page.find(kInternetOptionsSubPage, 0) != std::string::npos) { | 229 if (sub_page.find(kInternetOptionsSubPage, 0) != std::string::npos) { |
| 222 std::string::size_type loc = sub_page.find("?", 0); | 230 std::string::size_type loc = sub_page.find("?", 0); |
| 223 std::string network_page = | 231 std::string network_page = |
| 224 loc != std::string::npos ? sub_page.substr(loc) : std::string(); | 232 loc != std::string::npos ? sub_page.substr(loc) : std::string(); |
| 225 url = std::string(kChromeUISettingsURL) + network_page; | 233 url = std::string(kChromeUISettingsURL) + network_page; |
| 226 } | 234 } |
| 227 #endif | 235 #endif |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 SigninManagerFactory::GetForProfile(original_profile); | 401 SigninManagerFactory::GetForProfile(original_profile); |
| 394 DCHECK(manager->IsSigninAllowed()); | 402 DCHECK(manager->IsSigninAllowed()); |
| 395 if (manager->IsAuthenticated()) | 403 if (manager->IsAuthenticated()) |
| 396 ShowSettings(browser); | 404 ShowSettings(browser); |
| 397 else | 405 else |
| 398 ShowBrowserSignin(browser, access_point); | 406 ShowBrowserSignin(browser, access_point); |
| 399 } | 407 } |
| 400 #endif | 408 #endif |
| 401 | 409 |
| 402 } // namespace chrome | 410 } // namespace chrome |
| OLD | NEW |