Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 7497030: PluginList cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix crash Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "googleurl/src/gurl.h" 52 #include "googleurl/src/gurl.h"
53 #include "grit/browser_resources.h" 53 #include "grit/browser_resources.h"
54 #include "grit/chromium_strings.h" 54 #include "grit/chromium_strings.h"
55 #include "grit/generated_resources.h" 55 #include "grit/generated_resources.h"
56 #include "grit/locale_settings.h" 56 #include "grit/locale_settings.h"
57 #include "net/base/escape.h" 57 #include "net/base/escape.h"
58 #include "net/base/net_util.h" 58 #include "net/base/net_util.h"
59 #include "ui/base/l10n/l10n_util.h" 59 #include "ui/base/l10n/l10n_util.h"
60 #include "ui/base/resource/resource_bundle.h" 60 #include "ui/base/resource/resource_bundle.h"
61 #include "webkit/glue/webkit_glue.h" 61 #include "webkit/glue/webkit_glue.h"
62 #include "webkit/glue/plugins/plugin_list.h" 62 #include "webkit/plugins/npapi/plugin_list.h"
63 #include "webkit/plugins/npapi/webplugininfo.h" 63 #include "webkit/plugins/npapi/webplugininfo.h"
64 64
65 #ifdef CHROME_V8 65 #ifdef CHROME_V8
66 #include "v8/include/v8.h" 66 #include "v8/include/v8.h"
67 #endif 67 #endif
68 68
69 #if defined(OS_WIN) 69 #if defined(OS_WIN)
70 #include "chrome/browser/enumerate_modules_model_win.h" 70 #include "chrome/browser/enumerate_modules_model_win.h"
71 #elif defined(OS_CHROMEOS) 71 #elif defined(OS_CHROMEOS)
72 #include "chrome/browser/chromeos/cros/cros_library.h" 72 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 localized_strings->SetString("platform", 1101 localized_strings->SetString("platform",
1102 l10n_util::GetStringUTF16(IDS_PLATFORM_LABEL)); 1102 l10n_util::GetStringUTF16(IDS_PLATFORM_LABEL));
1103 localized_strings->SetString("os_type", version_info.OSType()); 1103 localized_strings->SetString("os_type", version_info.OSType());
1104 localized_strings->SetString("webkit_version", webkit_version); 1104 localized_strings->SetString("webkit_version", webkit_version);
1105 localized_strings->SetString("js_engine", js_engine); 1105 localized_strings->SetString("js_engine", js_engine);
1106 localized_strings->SetString("js_version", js_version); 1106 localized_strings->SetString("js_version", js_version);
1107 1107
1108 // Obtain the version of the first enabled Flash plugin. 1108 // Obtain the version of the first enabled Flash plugin.
1109 std::vector<webkit::npapi::WebPluginInfo> info_array; 1109 std::vector<webkit::npapi::WebPluginInfo> info_array;
1110 webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( 1110 webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
1111 GURL(), "application/x-shockwave-flash", false, &info_array, NULL); 1111 GURL(), "application/x-shockwave-flash", false, NULL, &info_array, NULL);
1112 string16 flash_version = 1112 string16 flash_version =
1113 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN); 1113 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN);
1114 for (size_t i = 0; i < info_array.size(); ++i) { 1114 for (size_t i = 0; i < info_array.size(); ++i) {
1115 if (webkit::npapi::IsPluginEnabled(info_array[i])) { 1115 if (webkit::npapi::IsPluginEnabled(info_array[i])) {
1116 flash_version = info_array[i].version; 1116 flash_version = info_array[i].version;
1117 break; 1117 break;
1118 } 1118 }
1119 } 1119 }
1120 localized_strings->SetString("flash_plugin", "Flash"); 1120 localized_strings->SetString("flash_plugin", "Flash");
1121 localized_strings->SetString("flash_version", flash_version); 1121 localized_strings->SetString("flash_version", flash_version);
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 return false; 1523 return false;
1524 } 1524 }
1525 1525
1526 std::vector<std::string> ChromePaths() { 1526 std::vector<std::string> ChromePaths() {
1527 std::vector<std::string> paths; 1527 std::vector<std::string> paths;
1528 paths.reserve(arraysize(kChromePaths)); 1528 paths.reserve(arraysize(kChromePaths));
1529 for (size_t i = 0; i < arraysize(kChromePaths); i++) 1529 for (size_t i = 0; i < arraysize(kChromePaths); i++)
1530 paths.push_back(kChromePaths[i]); 1530 paths.push_back(kChromePaths[i]);
1531 return paths; 1531 return paths;
1532 } 1532 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698