| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 |
| 11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
| 12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/file_version_info.h" | 14 #include "base/file_version_info.h" |
| 15 #include "base/histogram.h" | 15 #include "base/histogram.h" |
| 16 #include "base/i18n/number_formatting.h" | 16 #include "base/i18n/number_formatting.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "base/platform_thread.h" | 18 #include "base/platform_thread.h" |
| 19 #include "base/stats_table.h" | 19 #include "base/stats_table.h" |
| 20 #include "base/string_piece.h" | 20 #include "base/string_piece.h" |
| 21 #include "base/string_util.h" | 21 #include "base/string_util.h" |
| 22 #include "base/thread.h" | 22 #include "base/thread.h" |
| 23 #include "base/tracked_objects.h" | 23 #include "base/tracked_objects.h" |
| 24 #include "chrome/app/chrome_version_info.h" | |
| 25 #include "chrome/browser/browser.h" | 24 #include "chrome/browser/browser.h" |
| 26 #include "chrome/browser/browser_process.h" | 25 #include "chrome/browser/browser_process.h" |
| 27 #include "chrome/browser/chrome_thread.h" | 26 #include "chrome/browser/chrome_thread.h" |
| 28 #include "chrome/browser/defaults.h" | 27 #include "chrome/browser/defaults.h" |
| 29 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 28 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
| 30 #include "chrome/browser/google_service_auth_error.h" | 29 #include "chrome/browser/google_service_auth_error.h" |
| 31 #include "chrome/browser/memory_details.h" | 30 #include "chrome/browser/memory_details.h" |
| 32 #include "chrome/browser/metrics/histogram_synchronizer.h" | 31 #include "chrome/browser/metrics/histogram_synchronizer.h" |
| 33 #include "chrome/browser/net/predictor_api.h" | 32 #include "chrome/browser/net/predictor_api.h" |
| 34 #include "chrome/browser/platform_util.h" | 33 #include "chrome/browser/platform_util.h" |
| 35 #include "chrome/browser/pref_service.h" | 34 #include "chrome/browser/pref_service.h" |
| 36 #include "chrome/browser/profile.h" | 35 #include "chrome/browser/profile.h" |
| 37 #include "chrome/browser/profile_manager.h" | 36 #include "chrome/browser/profile_manager.h" |
| 38 #include "chrome/browser/renderer_host/render_process_host.h" | 37 #include "chrome/browser/renderer_host/render_process_host.h" |
| 39 #include "chrome/browser/renderer_host/render_view_host.h" | 38 #include "chrome/browser/renderer_host/render_view_host.h" |
| 40 #include "chrome/browser/sync/profile_sync_service.h" | 39 #include "chrome/browser/sync/profile_sync_service.h" |
| 41 #include "chrome/common/about_handler.h" | 40 #include "chrome/common/about_handler.h" |
| 42 #include "chrome/common/chrome_paths.h" | 41 #include "chrome/common/chrome_paths.h" |
| 42 #include "chrome/common/chrome_version_info.h" |
| 43 #include "chrome/common/jstemplate_builder.h" | 43 #include "chrome/common/jstemplate_builder.h" |
| 44 #include "chrome/common/pref_names.h" | 44 #include "chrome/common/pref_names.h" |
| 45 #include "chrome/common/render_messages.h" | 45 #include "chrome/common/render_messages.h" |
| 46 #include "chrome/common/url_constants.h" | 46 #include "chrome/common/url_constants.h" |
| 47 #include "googleurl/src/gurl.h" | 47 #include "googleurl/src/gurl.h" |
| 48 #include "grit/browser_resources.h" | 48 #include "grit/browser_resources.h" |
| 49 #include "grit/chromium_strings.h" | 49 #include "grit/chromium_strings.h" |
| 50 #include "grit/generated_resources.h" | 50 #include "grit/generated_resources.h" |
| 51 #include "grit/locale_settings.h" | 51 #include "grit/locale_settings.h" |
| 52 #include "webkit/glue/webkit_glue.h" | 52 #include "webkit/glue/webkit_glue.h" |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 // TODO(nkostylev): Embed registration form URL from startup manifest. | 610 // TODO(nkostylev): Embed registration form URL from startup manifest. |
| 611 // http://crosbug.com/4645. | 611 // http://crosbug.com/4645. |
| 612 | 612 |
| 613 return register_html.as_string(); | 613 return register_html.as_string(); |
| 614 } | 614 } |
| 615 #endif | 615 #endif |
| 616 | 616 |
| 617 std::string AboutVersion(DictionaryValue* localized_strings) { | 617 std::string AboutVersion(DictionaryValue* localized_strings) { |
| 618 localized_strings->SetString(L"title", | 618 localized_strings->SetString(L"title", |
| 619 l10n_util::GetString(IDS_ABOUT_VERSION_TITLE)); | 619 l10n_util::GetString(IDS_ABOUT_VERSION_TITLE)); |
| 620 scoped_ptr<FileVersionInfo> version_info( | 620 scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); |
| 621 chrome_app::GetChromeVersionInfo()); | |
| 622 if (version_info == NULL) { | 621 if (version_info == NULL) { |
| 623 DLOG(ERROR) << "Unable to create FileVersionInfo object"; | 622 DLOG(ERROR) << "Unable to create FileVersionInfo object"; |
| 624 return std::string(); | 623 return std::string(); |
| 625 } | 624 } |
| 626 | 625 |
| 627 std::string webkit_version = webkit_glue::GetWebKitVersion(); | 626 std::string webkit_version = webkit_glue::GetWebKitVersion(); |
| 628 #ifdef CHROME_V8 | 627 #ifdef CHROME_V8 |
| 629 std::string js_version(v8::V8::GetVersion()); | 628 std::string js_version(v8::V8::GetVersion()); |
| 630 std::string js_engine = "V8"; | 629 std::string js_engine = "V8"; |
| 631 #else | 630 #else |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 // Run the dialog. This will re-use the existing one if it's already up. | 1185 // Run the dialog. This will re-use the existing one if it's already up. |
| 1187 AboutIPCDialog::RunDialog(); | 1186 AboutIPCDialog::RunDialog(); |
| 1188 return true; | 1187 return true; |
| 1189 } | 1188 } |
| 1190 #endif | 1189 #endif |
| 1191 | 1190 |
| 1192 #endif // OFFICIAL_BUILD | 1191 #endif // OFFICIAL_BUILD |
| 1193 | 1192 |
| 1194 return false; | 1193 return false; |
| 1195 } | 1194 } |
| OLD | NEW |