| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "base/tracked_objects.h" | 25 #include "base/tracked_objects.h" |
| 26 #include "base/utf_string_conversions.h" | 26 #include "base/utf_string_conversions.h" |
| 27 #include "base/values.h" | 27 #include "base/values.h" |
| 28 #include "chrome/browser/about_flags.h" | 28 #include "chrome/browser/about_flags.h" |
| 29 #include "chrome/browser/browser_process.h" | 29 #include "chrome/browser/browser_process.h" |
| 30 #include "chrome/browser/defaults.h" | 30 #include "chrome/browser/defaults.h" |
| 31 #include "chrome/browser/memory_details.h" | 31 #include "chrome/browser/memory_details.h" |
| 32 #include "chrome/browser/metrics/histogram_synchronizer.h" | 32 #include "chrome/browser/metrics/histogram_synchronizer.h" |
| 33 #include "chrome/browser/net/predictor_api.h" | 33 #include "chrome/browser/net/predictor_api.h" |
| 34 #include "chrome/browser/net/url_fixer_upper.h" | 34 #include "chrome/browser/net/url_fixer_upper.h" |
| 35 #include "chrome/browser/plugin_prefs.h" | |
| 36 #include "chrome/browser/profiles/profile.h" | 35 #include "chrome/browser/profiles/profile.h" |
| 37 #include "chrome/browser/profiles/profile_manager.h" | 36 #include "chrome/browser/profiles/profile_manager.h" |
| 38 #include "chrome/browser/ui/browser_dialogs.h" | 37 #include "chrome/browser/ui/browser_dialogs.h" |
| 39 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 38 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 40 #include "chrome/common/about_handler.h" | 39 #include "chrome/common/about_handler.h" |
| 41 #include "chrome/common/chrome_paths.h" | 40 #include "chrome/common/chrome_paths.h" |
| 42 #include "chrome/common/chrome_version_info.h" | 41 #include "chrome/common/chrome_version_info.h" |
| 43 #include "chrome/common/jstemplate_builder.h" | 42 #include "chrome/common/jstemplate_builder.h" |
| 44 #include "chrome/common/net/gaia/google_service_auth_error.h" | 43 #include "chrome/common/net/gaia/google_service_auth_error.h" |
| 45 #include "chrome/common/render_messages.h" | 44 #include "chrome/common/render_messages.h" |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 localized_strings->SetString("webkit_version", webkit_version); | 1106 localized_strings->SetString("webkit_version", webkit_version); |
| 1108 localized_strings->SetString("js_engine", js_engine); | 1107 localized_strings->SetString("js_engine", js_engine); |
| 1109 localized_strings->SetString("js_version", js_version); | 1108 localized_strings->SetString("js_version", js_version); |
| 1110 | 1109 |
| 1111 // Obtain the version of the first enabled Flash plugin. | 1110 // Obtain the version of the first enabled Flash plugin. |
| 1112 std::vector<webkit::npapi::WebPluginInfo> info_array; | 1111 std::vector<webkit::npapi::WebPluginInfo> info_array; |
| 1113 webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( | 1112 webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( |
| 1114 GURL(), "application/x-shockwave-flash", false, NULL, &info_array, NULL); | 1113 GURL(), "application/x-shockwave-flash", false, NULL, &info_array, NULL); |
| 1115 string16 flash_version = | 1114 string16 flash_version = |
| 1116 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN); | 1115 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN); |
| 1117 PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile); | |
| 1118 for (size_t i = 0; i < info_array.size(); ++i) { | 1116 for (size_t i = 0; i < info_array.size(); ++i) { |
| 1119 if (plugin_prefs->IsPluginEnabled(info_array[i])) { | 1117 if (webkit::npapi::IsPluginEnabled(info_array[i])) { |
| 1120 flash_version = info_array[i].version; | 1118 flash_version = info_array[i].version; |
| 1121 break; | 1119 break; |
| 1122 } | 1120 } |
| 1123 } | 1121 } |
| 1124 localized_strings->SetString("flash_plugin", "Flash"); | 1122 localized_strings->SetString("flash_plugin", "Flash"); |
| 1125 localized_strings->SetString("flash_version", flash_version); | 1123 localized_strings->SetString("flash_version", flash_version); |
| 1126 localized_strings->SetString("webkit_version", webkit_version); | 1124 localized_strings->SetString("webkit_version", webkit_version); |
| 1127 localized_strings->SetString("company", | 1125 localized_strings->SetString("company", |
| 1128 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMPANY_NAME)); | 1126 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMPANY_NAME)); |
| 1129 localized_strings->SetString("copyright", | 1127 localized_strings->SetString("copyright", |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 return false; | 1525 return false; |
| 1528 } | 1526 } |
| 1529 | 1527 |
| 1530 std::vector<std::string> ChromePaths() { | 1528 std::vector<std::string> ChromePaths() { |
| 1531 std::vector<std::string> paths; | 1529 std::vector<std::string> paths; |
| 1532 paths.reserve(arraysize(kChromePaths)); | 1530 paths.reserve(arraysize(kChromePaths)); |
| 1533 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1531 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
| 1534 paths.push_back(kChromePaths[i]); | 1532 paths.push_back(kChromePaths[i]); |
| 1535 return paths; | 1533 return paths; |
| 1536 } | 1534 } |
| OLD | NEW |