| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "chrome/browser/net/url_fixer_upper.h" | 13 #include "chrome/browser/net/url_fixer_upper.h" |
| 14 #include "chrome/browser/ui/browser_dialogs.h" | 14 #include "chrome/browser/ui/browser_dialogs.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
| 17 | 17 |
| 18 #if defined(OS_ANDROID) |
| 19 // static |
| 20 AboutAndroidApp::Callback AboutAndroidApp::label_getter_ = NULL; |
| 21 AboutAndroidApp::Callback AboutAndroidApp::version_name_getter_ = NULL; |
| 22 AboutAndroidApp::Callback AboutAndroidApp::version_code_getter_ = NULL; |
| 23 |
| 24 // static |
| 25 void AboutAndroidApp::RegisterGetters( |
| 26 AboutAndroidApp::Callback label_getter, |
| 27 AboutAndroidApp::Callback version_name_getter, |
| 28 AboutAndroidApp::Callback version_code_getter) { |
| 29 label_getter_ = label_getter; |
| 30 version_name_getter_ = version_name_getter; |
| 31 version_code_getter_ = version_code_getter; |
| 32 } |
| 33 #endif |
| 34 |
| 18 namespace { | 35 namespace { |
| 19 | 36 |
| 20 // Add paths here to be included in chrome://chrome-urls (about:about). | 37 // Add paths here to be included in chrome://chrome-urls (about:about). |
| 21 // These paths will also be suggested by BuiltinProvider. | 38 // These paths will also be suggested by BuiltinProvider. |
| 22 const char* const kChromePaths[] = { | 39 const char* const kChromePaths[] = { |
| 23 chrome::kChromeUIAppCacheInternalsHost, | 40 chrome::kChromeUIAppCacheInternalsHost, |
| 24 chrome::kChromeUIBlobInternalsHost, | 41 chrome::kChromeUIBlobInternalsHost, |
| 25 chrome::kChromeUIBookmarksHost, | 42 chrome::kChromeUIBookmarksHost, |
| 26 chrome::kChromeUICacheHost, | 43 chrome::kChromeUICacheHost, |
| 27 chrome::kChromeUIChromeURLsHost, | 44 chrome::kChromeUIChromeURLsHost, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 49 chrome::kChromeUIQuotaInternalsHost, | 66 chrome::kChromeUIQuotaInternalsHost, |
| 50 chrome::kChromeUISettingsHost, | 67 chrome::kChromeUISettingsHost, |
| 51 chrome::kChromeUIStatsHost, | 68 chrome::kChromeUIStatsHost, |
| 52 chrome::kChromeUISyncInternalsHost, | 69 chrome::kChromeUISyncInternalsHost, |
| 53 #if defined(OS_CHROMEOS) | 70 #if defined(OS_CHROMEOS) |
| 54 chrome::kChromeUITaskManagerHost, | 71 chrome::kChromeUITaskManagerHost, |
| 55 #endif | 72 #endif |
| 56 chrome::kChromeUITermsHost, | 73 chrome::kChromeUITermsHost, |
| 57 chrome::kChromeUITracingHost, | 74 chrome::kChromeUITracingHost, |
| 58 chrome::kChromeUIVersionHost, | 75 chrome::kChromeUIVersionHost, |
| 76 #if defined(OS_ANDROID) |
| 77 chrome::kChromeUIWelcomeHost, |
| 78 #endif |
| 59 #if defined(OS_WIN) | 79 #if defined(OS_WIN) |
| 60 chrome::kChromeUIConflictsHost, | 80 chrome::kChromeUIConflictsHost, |
| 61 #endif | 81 #endif |
| 62 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 82 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 63 chrome::kChromeUILinuxProxyConfigHost, | 83 chrome::kChromeUILinuxProxyConfigHost, |
| 64 chrome::kChromeUISandboxHost, | 84 chrome::kChromeUISandboxHost, |
| 65 #endif | 85 #endif |
| 66 #if defined(OS_CHROMEOS) | 86 #if defined(OS_CHROMEOS) |
| 67 chrome::kChromeUIChooseMobileNetworkHost, | 87 chrome::kChromeUIChooseMobileNetworkHost, |
| 68 chrome::kChromeUICryptohomeHost, | 88 chrome::kChromeUICryptohomeHost, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 return false; | 181 return false; |
| 162 } | 182 } |
| 163 | 183 |
| 164 std::vector<std::string> ChromePaths() { | 184 std::vector<std::string> ChromePaths() { |
| 165 std::vector<std::string> paths; | 185 std::vector<std::string> paths; |
| 166 paths.reserve(arraysize(kChromePaths)); | 186 paths.reserve(arraysize(kChromePaths)); |
| 167 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 187 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
| 168 paths.push_back(kChromePaths[i]); | 188 paths.push_back(kChromePaths[i]); |
| 169 return paths; | 189 return paths; |
| 170 } | 190 } |
| OLD | NEW |