| 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 host = chrome::kChromeUIHistoryFrameHost; | 70 host = chrome::kChromeUIHistoryFrameHost; |
| 71 #else | 71 #else |
| 72 host = chrome::kChromeUIUberHost; | 72 host = chrome::kChromeUIUberHost; |
| 73 path = chrome::kChromeUIHistoryHost + url->path(); | 73 path = chrome::kChromeUIHistoryHost + url->path(); |
| 74 #endif | 74 #endif |
| 75 // Redirect chrome://settings | 75 // Redirect chrome://settings |
| 76 } else if (host == chrome::kChromeUISettingsHost) { | 76 } else if (host == chrome::kChromeUISettingsHost) { |
| 77 if (::switches::AboutInSettingsEnabled()) { | 77 if (::switches::AboutInSettingsEnabled()) { |
| 78 host = chrome::kChromeUISettingsFrameHost; | 78 host = chrome::kChromeUISettingsFrameHost; |
| 79 } else { | 79 } else { |
| 80 #if defined(OS_ANDROID) |
| 81 host = chrome::kChromeUISettingsFrameHost; |
| 82 #else |
| 80 host = chrome::kChromeUIUberHost; | 83 host = chrome::kChromeUIUberHost; |
| 81 path = chrome::kChromeUISettingsHost + url->path(); | 84 path = chrome::kChromeUISettingsHost + url->path(); |
| 85 #endif |
| 82 } | 86 } |
| 83 // Redirect chrome://help | 87 // Redirect chrome://help |
| 84 } else if (host == chrome::kChromeUIHelpHost) { | 88 } else if (host == chrome::kChromeUIHelpHost) { |
| 85 if (::switches::AboutInSettingsEnabled()) { | 89 if (::switches::AboutInSettingsEnabled()) { |
| 86 host = chrome::kChromeUISettingsFrameHost; | 90 host = chrome::kChromeUISettingsFrameHost; |
| 87 if (url->path().empty() || url->path() == "/") | 91 if (url->path().empty() || url->path() == "/") |
| 88 path = chrome::kChromeUIHelpHost; | 92 path = chrome::kChromeUIHelpHost; |
| 89 } else { | 93 } else { |
| 90 host = chrome::kChromeUIUberHost; | 94 host = chrome::kChromeUIUberHost; |
| 91 path = chrome::kChromeUIHelpHost + url->path(); | 95 path = chrome::kChromeUIHelpHost + url->path(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 112 FROM_HERE, base::Bind(&chrome::AttemptRestart)); | 116 FROM_HERE, base::Bind(&chrome::AttemptRestart)); |
| 113 return true; | 117 return true; |
| 114 } else if (base::LowerCaseEqualsASCII(spec, chrome::kChromeUIQuitURL)) { | 118 } else if (base::LowerCaseEqualsASCII(spec, chrome::kChromeUIQuitURL)) { |
| 115 base::ThreadTaskRunnerHandle::Get()->PostTask( | 119 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 116 FROM_HERE, base::Bind(&chrome::AttemptExit)); | 120 FROM_HERE, base::Bind(&chrome::AttemptExit)); |
| 117 return true; | 121 return true; |
| 118 } | 122 } |
| 119 | 123 |
| 120 return false; | 124 return false; |
| 121 } | 125 } |
| OLD | NEW |