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

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

Issue 7864014: Remove CHROME_V8 #define and related javascript_engine gyp variable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "crypto/nss_util.h" 53 #include "crypto/nss_util.h"
54 #include "googleurl/src/gurl.h" 54 #include "googleurl/src/gurl.h"
55 #include "grit/browser_resources.h" 55 #include "grit/browser_resources.h"
56 #include "grit/chromium_strings.h" 56 #include "grit/chromium_strings.h"
57 #include "grit/generated_resources.h" 57 #include "grit/generated_resources.h"
58 #include "grit/locale_settings.h" 58 #include "grit/locale_settings.h"
59 #include "net/base/escape.h" 59 #include "net/base/escape.h"
60 #include "net/base/net_util.h" 60 #include "net/base/net_util.h"
61 #include "ui/base/l10n/l10n_util.h" 61 #include "ui/base/l10n/l10n_util.h"
62 #include "ui/base/resource/resource_bundle.h" 62 #include "ui/base/resource/resource_bundle.h"
63 #include "v8/include/v8.h"
63 #include "webkit/glue/webkit_glue.h" 64 #include "webkit/glue/webkit_glue.h"
64 #include "webkit/plugins/npapi/plugin_list.h" 65 #include "webkit/plugins/npapi/plugin_list.h"
65 #include "webkit/plugins/webplugininfo.h" 66 #include "webkit/plugins/webplugininfo.h"
66 67
67 #ifdef CHROME_V8
68 #include "v8/include/v8.h"
69 #endif
70
71 #if defined(OS_WIN) 68 #if defined(OS_WIN)
72 #include "chrome/browser/enumerate_modules_model_win.h" 69 #include "chrome/browser/enumerate_modules_model_win.h"
73 #elif defined(OS_CHROMEOS) 70 #elif defined(OS_CHROMEOS)
74 #include "chrome/browser/chromeos/cros/cros_library.h" 71 #include "chrome/browser/chromeos/cros/cros_library.h"
75 #include "chrome/browser/chromeos/cros/cryptohome_library.h" 72 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
76 #include "chrome/browser/chromeos/cros/network_library.h" 73 #include "chrome/browser/chromeos/cros/network_library.h"
77 #include "chrome/browser/chromeos/customization_document.h" 74 #include "chrome/browser/chromeos/customization_document.h"
78 #include "chrome/browser/chromeos/login/wizard_controller.h" 75 #include "chrome/browser/chromeos/login/wizard_controller.h"
79 #include "chrome/browser/chromeos/version_loader.h" 76 #include "chrome/browser/chromeos/version_loader.h"
80 #include "chrome/browser/oom_priority_manager.h" 77 #include "chrome/browser/oom_priority_manager.h"
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 IDR_ABOUT_VERSION_HTML).as_string(); 1096 IDR_ABOUT_VERSION_HTML).as_string();
1100 } 1097 }
1101 1098
1102 std::string AboutVersionStrings(DictionaryValue* localized_strings, 1099 std::string AboutVersionStrings(DictionaryValue* localized_strings,
1103 Profile* profile) { 1100 Profile* profile) {
1104 localized_strings->SetString("title", 1101 localized_strings->SetString("title",
1105 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_TITLE)); 1102 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_TITLE));
1106 chrome::VersionInfo version_info; 1103 chrome::VersionInfo version_info;
1107 1104
1108 std::string webkit_version = webkit_glue::GetWebKitVersion(); 1105 std::string webkit_version = webkit_glue::GetWebKitVersion();
1109 #ifdef CHROME_V8
1110 std::string js_version(v8::V8::GetVersion()); 1106 std::string js_version(v8::V8::GetVersion());
tfarina 2011/09/09 22:01:40 you can call v8::V8::GetVersion() directly at line
Mihai Parparita -not on Chrome 2011/09/09 22:36:32 Done.
1111 std::string js_engine = "V8"; 1107 std::string js_engine = "V8";
tfarina 2011/09/09 22:01:40 same thing here.
Mihai Parparita -not on Chrome 2011/09/09 22:36:32 Done.
1112 #else
1113 std::string js_version = webkit_version;
1114 std::string js_engine = "JavaScriptCore";
1115 #endif
1116 1108
1117 localized_strings->SetString("name", 1109 localized_strings->SetString("name",
1118 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 1110 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
1119 localized_strings->SetString("version", version_info.Version()); 1111 localized_strings->SetString("version", version_info.Version());
1120 // Bug 79458: Need to evaluate the use of getting the version string on 1112 // Bug 79458: Need to evaluate the use of getting the version string on
1121 // this thread. 1113 // this thread.
1122 base::ThreadRestrictions::ScopedAllowIO allow_io; 1114 base::ThreadRestrictions::ScopedAllowIO allow_io;
1123 localized_strings->SetString("version_modifier", 1115 localized_strings->SetString("version_modifier",
1124 chrome::VersionInfo::GetVersionStringModifier()); 1116 chrome::VersionInfo::GetVersionStringModifier());
1125 localized_strings->SetString("os_name", 1117 localized_strings->SetString("os_name",
(...skipping 13 matching lines...) Expand all
1139 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN); 1131 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN);
1140 PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile); 1132 PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile);
1141 for (size_t i = 0; i < info_array.size(); ++i) { 1133 for (size_t i = 0; i < info_array.size(); ++i) {
1142 if (plugin_prefs->IsPluginEnabled(info_array[i])) { 1134 if (plugin_prefs->IsPluginEnabled(info_array[i])) {
1143 flash_version = info_array[i].version; 1135 flash_version = info_array[i].version;
1144 break; 1136 break;
1145 } 1137 }
1146 } 1138 }
1147 localized_strings->SetString("flash_plugin", "Flash"); 1139 localized_strings->SetString("flash_plugin", "Flash");
1148 localized_strings->SetString("flash_version", flash_version); 1140 localized_strings->SetString("flash_version", flash_version);
1149 localized_strings->SetString("webkit_version", webkit_version); 1141 localized_strings->SetString("webkit_version", webkit_version);
tfarina 2011/09/09 22:01:40 Is this needed? We have the same code at line 1122
Mihai Parparita -not on Chrome 2011/09/09 22:36:32 Doesn't seem that way, removed.
1150 localized_strings->SetString("company", 1142 localized_strings->SetString("company",
1151 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMPANY_NAME)); 1143 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMPANY_NAME));
1152 localized_strings->SetString("copyright", 1144 localized_strings->SetString("copyright",
1153 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COPYRIGHT)); 1145 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COPYRIGHT));
1154 localized_strings->SetString("cl", version_info.LastChange()); 1146 localized_strings->SetString("cl", version_info.LastChange());
1155 localized_strings->SetString("official", 1147 localized_strings->SetString("official",
1156 l10n_util::GetStringUTF16( 1148 l10n_util::GetStringUTF16(
1157 version_info.IsOfficialBuild() ? 1149 version_info.IsOfficialBuild() ?
1158 IDS_ABOUT_VERSION_OFFICIAL 1150 IDS_ABOUT_VERSION_OFFICIAL
1159 : IDS_ABOUT_VERSION_UNOFFICIAL)); 1151 : IDS_ABOUT_VERSION_UNOFFICIAL));
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 return false; 1569 return false;
1578 } 1570 }
1579 1571
1580 std::vector<std::string> ChromePaths() { 1572 std::vector<std::string> ChromePaths() {
1581 std::vector<std::string> paths; 1573 std::vector<std::string> paths;
1582 paths.reserve(arraysize(kChromePaths)); 1574 paths.reserve(arraysize(kChromePaths));
1583 for (size_t i = 0; i < arraysize(kChromePaths); i++) 1575 for (size_t i = 0; i < arraysize(kChromePaths); i++)
1584 paths.push_back(kChromePaths[i]); 1576 paths.push_back(kChromePaths[i]);
1585 return paths; 1577 return paths;
1586 } 1578 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698