diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 23:02:11 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 23:02:11 +0000 |
commit | 1eeb5e08580730cb2a0a2751f578dbc4e6402369 (patch) | |
tree | 8c630e2df02da8815f0ae5984bb708e8186af400 | |
parent | 4b783b4849481423eea0c1a99eb56f1b218ec4ba (diff) | |
download | chromium_src-1eeb5e08580730cb2a0a2751f578dbc4e6402369.zip chromium_src-1eeb5e08580730cb2a0a2751f578dbc4e6402369.tar.gz chromium_src-1eeb5e08580730cb2a0a2751f578dbc4e6402369.tar.bz2 |
Cleanup: Break another common->app dependency.
BUG=46666
TEST=none
Review URL: http://codereview.chromium.org/3007008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53113 0039d316-1c4b-4281-b951-d872f2087c98
25 files changed, 95 insertions, 83 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index 16dbb2f..57669a4 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -48,7 +48,6 @@ #include "base/stats_table.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/diagnostics/diagnostics_main.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/platform_util.h" @@ -57,6 +56,7 @@ #include "chrome/common/chrome_descriptors.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/logging_chrome.h" #include "chrome/common/main_function_params.h" #include "chrome/common/sandbox_init_wrapper.h" @@ -509,7 +509,7 @@ int ChromeMain(int argc, char** argv) { #if defined(OS_POSIX) && !defined(OS_MACOSX) if (parsed_command_line.HasSwitch(switches::kProductVersion)) { - scoped_ptr<FileVersionInfo> version(chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version(chrome::GetChromeVersionInfo()); printf("%s\n", WideToASCII(version->product_version()).c_str()); return 0; } @@ -517,7 +517,7 @@ int ChromeMain(int argc, char** argv) { #if defined(OS_POSIX) if (parsed_command_line.HasSwitch(switches::kVersion)) { - scoped_ptr<FileVersionInfo> version(chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version(chrome::GetChromeVersionInfo()); printf("%s %s %s\n", WideToUTF8(version->product_name()).c_str(), WideToASCII(version->product_version()).c_str(), diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 1460041..6590592 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -26,7 +26,6 @@ #include "base/values.h" #include "base/waitable_event.h" #include "chrome/app/chrome_dll_resource.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/app_modal_dialog.h" #include "chrome/browser/app_modal_dialog_queue.h" #include "chrome/browser/autofill/autofill_manager.h" @@ -84,6 +83,7 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/json_value_serializer.h" #include "chrome/common/net/url_request_context_getter.h" @@ -195,8 +195,7 @@ void AutomationProvider::ConnectToChannel(const std::string& channel_id) { automation_resource_message_filter_, g_browser_process->io_thread()->message_loop(), true, g_browser_process->shutdown_event())); - scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); std::string version_string; if (version_info != NULL) { version_string = WideToASCII(version_info->file_version()); diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 9607cad..f3f324b 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -21,7 +21,6 @@ #include "base/string_util.h" #include "base/thread.h" #include "base/tracked_objects.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_thread.h" @@ -40,6 +39,7 @@ #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/common/about_handler.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/jstemplate_builder.h" #include "chrome/common/pref_names.h" #include "chrome/common/render_messages.h" @@ -617,8 +617,7 @@ std::string AboutRegisterProduct() { std::string AboutVersion(DictionaryValue* localized_strings) { localized_strings->SetString(L"title", l10n_util::GetString(IDS_ABOUT_VERSION_TITLE)); - scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); if (version_info == NULL) { DLOG(ERROR) << "Unable to create FileVersionInfo object"; return std::string(); diff --git a/chrome/browser/bug_report_util.cc b/chrome/browser/bug_report_util.cc index 844abfe..3f51fe7 100644 --- a/chrome/browser/bug_report_util.cc +++ b/chrome/browser/bug_report_util.cc @@ -7,11 +7,11 @@ #include "app/l10n_util.h" #include "base/file_version_info.h" #include "base/utf_string_conversions.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/browser_process_impl.h" #include "chrome/browser/profile.h" #include "chrome/browser/safe_browsing/safe_browsing_util.h" #include "chrome/browser/tab_contents/tab_contents.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/net/url_fetcher.h" #include "googleurl/src/gurl.h" #include "grit/locale_settings.h" @@ -179,8 +179,7 @@ void BugReportUtil::SendReport(Profile* profile, // Add the Chrome version std::string chrome_version; - scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); if (version_info.get()) { chrome_version = WideToUTF8(version_info->product_name()) + " - " + WideToUTF8(version_info->file_version()) + diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc index 77a5b8c..9f3e3d80 100644 --- a/chrome/browser/diagnostics/recon_diagnostics.cc +++ b/chrome/browser/diagnostics/recon_diagnostics.cc @@ -1,9 +1,11 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/diagnostics/recon_diagnostics.h" +#include <string> + #include "app/app_paths.h" #include "base/file_util.h" #include "base/file_version_info.h" @@ -12,10 +14,10 @@ #include "base/utf_string_conversions.h" #include "base/sys_info.h" #include "base/path_service.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/diagnostics/diagnostics_test.h" #include "chrome/browser/platform_util.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/json_value_serializer.h" #if defined(OS_WIN) @@ -115,7 +117,7 @@ class VersionTest : public DiagnosticTest { virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + chrome::GetChromeVersionInfo()); if (!version_info.get()) { RecordFailure(ASCIIToUTF16("No Version")); return true; diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc index 0daacff..951aef4 100644 --- a/chrome/browser/dom_ui/net_internals_ui.cc +++ b/chrome/browser/dom_ui/net_internals_ui.cc @@ -7,6 +7,7 @@ #include <algorithm> #include <sstream> #include <string> +#include <utility> #include <vector> #include "app/l10n_util.h" @@ -21,7 +22,6 @@ #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "base/values.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/dom_ui/chrome_url_data_manager.h" @@ -33,6 +33,7 @@ #include "chrome/browser/platform_util.h" #include "chrome/browser/profile.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/net/url_request_context_getter.h" #include "chrome/common/url_constants.h" #include "grit/generated_resources.h" @@ -488,7 +489,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( DictionaryValue* dict = new DictionaryValue(); scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + chrome::GetChromeVersionInfo()); if (version_info == NULL) { DLOG(ERROR) << "Unable to create FileVersionInfo object"; diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index 232d9dd..9f21100 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -18,7 +18,6 @@ #include "base/time.h" #include "base/thread.h" #include "base/version.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/extension_error_reporter.h" #include "chrome/browser/extensions/extensions_service.h" @@ -26,6 +25,7 @@ #include "chrome/browser/profile.h" #include "chrome/browser/utility_process_host.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/pref_names.h" @@ -762,7 +762,7 @@ std::vector<int> ExtensionUpdater::DetermineUpdates( // First determine the browser version if we haven't already. if (!browser_version.get()) { scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + chrome::GetChromeVersionInfo()); if (version_info.get()) { browser_version.reset(Version::GetVersionFromString( version_info->product_version())); diff --git a/chrome/browser/gtk/about_chrome_dialog.cc b/chrome/browser/gtk/about_chrome_dialog.cc index ebe6d21..f9cdbe5 100644 --- a/chrome/browser/gtk/about_chrome_dialog.cc +++ b/chrome/browser/gtk/about_chrome_dialog.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,10 +6,12 @@ #include <gtk/gtk.h> +#include <string> +#include <vector> + #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/file_version_info.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/gtk/cairo_cached_surface.h" #include "chrome/browser/gtk/gtk_chrome_link_button.h" @@ -18,6 +20,7 @@ #include "chrome/browser/platform_util.h" #include "chrome/browser/profile.h" #include "chrome/common/chrome_constants.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/url_constants.h" #include "gfx/gtk_util.h" #include "grit/chromium_strings.h" @@ -104,8 +107,7 @@ gboolean OnEventBoxExpose(GtkWidget* event_box, void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); static GdkPixbuf* background = rb.GetPixbufNamed(IDR_ABOUT_BACKGROUND); - scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); std::wstring current_version = version_info->file_version(); #if !defined(GOOGLE_CHROME_BUILD) current_version += L" ("; diff --git a/chrome/browser/memory_details_mac.cc b/chrome/browser/memory_details_mac.cc index 48e758b..74a58d9 100644 --- a/chrome/browser/memory_details_mac.cc +++ b/chrome/browser/memory_details_mac.cc @@ -15,7 +15,6 @@ #include "base/string_util.h" #include "base/process_util.h" #include "base/thread.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/browser_child_process_host.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_thread.h" @@ -25,6 +24,7 @@ #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/chrome_constants.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/url_constants.h" #include "grit/chromium_strings.h" @@ -198,8 +198,7 @@ void MemoryDetails::CollectProcessDataChrome( else info.type = ChildProcessInfo::UNKNOWN_PROCESS; - scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); if (version_info.get()) { info.product_name = version_info->product_name(); info.version = version_info->product_version(); diff --git a/chrome/browser/memory_details_win.cc b/chrome/browser/memory_details_win.cc index 082bde5..5871687 100644 --- a/chrome/browser/memory_details_win.cc +++ b/chrome/browser/memory_details_win.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8,13 +8,13 @@ #include "app/l10n_util.h" #include "base/file_version_info.h" #include "base/string_util.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/browser_child_process_host.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/renderer_host/backing_store_manager.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/tab_contents.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/url_constants.h" #include "grit/chromium_strings.h" @@ -122,7 +122,7 @@ void MemoryDetails::CollectProcessData( TCHAR name[MAX_PATH]; if (index2 == CHROME_BROWSER || index2 == CHROME_NACL_PROCESS) { scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + chrome::GetChromeVersionInfo()); if (version_info != NULL) info.version = version_info->file_version(); // Check if this is one of the child processes whose data we collected diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc index 2f9253e..7384a2a 100644 --- a/chrome/browser/metrics/metrics_log.cc +++ b/chrome/browser/metrics/metrics_log.cc @@ -4,8 +4,10 @@ #include "chrome/browser/metrics/metrics_log.h" +#include <string> +#include <vector> + #include "base/base64.h" -#include "base/time.h" #include "base/basictypes.h" #include "base/file_util.h" #include "base/file_version_info.h" @@ -14,13 +16,14 @@ #include "base/scoped_ptr.h" #include "base/string_util.h" #include "base/sys_info.h" -#include "base/utf_string_conversions.h" #include "base/third_party/nspr/prtime.h" -#include "chrome/app/chrome_version_info.h" +#include "base/time.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/autocomplete/autocomplete.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/gpu_process_host.h" #include "chrome/browser/pref_service.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/logging_chrome.h" #include "chrome/common/pref_names.h" #include "googleurl/src/gurl.h" @@ -70,7 +73,7 @@ std::string MetricsLog::GetInstallDate() const { // static std::string MetricsLog::GetVersionString() { scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + chrome::GetChromeVersionInfo()); if (version_info.get()) { std::string version = WideToUTF8(version_info->product_version()); if (!version_extension_.empty()) diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc index ff4338a..3e9d5db 100644 --- a/chrome/browser/safe_browsing/protocol_manager.cc +++ b/chrome/browser/safe_browsing/protocol_manager.cc @@ -14,11 +14,11 @@ #include "base/string_util.h" #include "base/task.h" #include "base/timer.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/profile.h" #include "chrome/browser/safe_browsing/protocol_parser.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/env_vars.h" #include "chrome/common/net/url_request_context_getter.h" #include "net/base/escape.h" @@ -74,7 +74,7 @@ SafeBrowsingProtocolManager::SafeBrowsingProtocolManager( // The first update must happen between 1-5 minutes of start up. next_update_sec_ = base::RandInt(60, kSbTimerStartIntervalSec); - scoped_ptr<FileVersionInfo> version_info(chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); if (!version_info.get()) version_ = "0.1"; else diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc index 5a8ce96..78cfc54 100644 --- a/chrome/browser/sync/glue/sync_backend_host.cc +++ b/chrome/browser/sync/glue/sync_backend_host.cc @@ -3,11 +3,13 @@ // found in the LICENSE file. #include "build/build_config.h" + +#include <algorithm> + #include "base/file_util.h" #include "base/file_version_info.h" #include "base/task.h" #include "base/utf_string_conversions.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/profile.h" #include "chrome/browser/sync/engine/syncapi.h" @@ -18,6 +20,7 @@ #include "chrome/browser/sync/glue/http_bridge.h" #include "chrome/browser/sync/glue/password_model_worker.h" #include "chrome/browser/sync/sessions/session_state.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/notification_service.h" #include "chrome/common/notification_type.h" #include "webkit/glue/webkit_glue.h" @@ -362,8 +365,7 @@ std::string MakeUserAgentForSyncapi() { #elif defined(OS_MACOSX) user_agent += "MAC "; #endif - scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); if (version_info == NULL) { DLOG(ERROR) << "Unable to create FileVersionInfo object"; return user_agent; diff --git a/chrome/browser/upgrade_detector.cc b/chrome/browser/upgrade_detector.cc index 192f285..38bd2cd 100644 --- a/chrome/browser/upgrade_detector.cc +++ b/chrome/browser/upgrade_detector.cc @@ -4,6 +4,8 @@ #include "chrome/browser/upgrade_detector.h" +#include <string> + #include "base/command_line.h" #include "base/file_version_info.h" #include "base/scoped_ptr.h" @@ -11,10 +13,10 @@ #include "base/task.h" #include "base/utf_string_conversions.h" #include "base/version.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/pref_service.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/notification_service.h" #include "chrome/common/notification_type.h" #include "chrome/common/pref_names.h" @@ -104,7 +106,7 @@ class DetectUpgradeTask : public Task { #endif // Get the version of the currently *running* instance of Chrome. - scoped_ptr<FileVersionInfo> version(chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version(chrome::GetChromeVersionInfo()); if (version.get() == NULL) { NOTREACHED() << "Failed to get current file version"; return; diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc index bff959a..7025bf6 100644 --- a/chrome/browser/views/about_chrome_view.cc +++ b/chrome/browser/views/about_chrome_view.cc @@ -4,18 +4,22 @@ #include "chrome/browser/views/about_chrome_view.h" +#include <algorithm> +#include <string> +#include <vector> + #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/callback.h" #include "base/file_version_info.h" #include "base/i18n/rtl.h" #include "base/utf_string_conversions.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/platform_util.h" #include "chrome/browser/views/accessible_view_helper.h" #include "chrome/common/chrome_constants.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/url_constants.h" #include "gfx/canvas.h" #include "grit/chromium_strings.h" @@ -135,8 +139,7 @@ void AboutChromeView::Init() { text_direction_is_rtl_ = base::i18n::IsRTL(); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); if (version_info.get() == NULL) { NOTREACHED() << L"Failed to initialize about window"; return; diff --git a/chrome/browser/views/bug_report_view.cc b/chrome/browser/views/bug_report_view.cc index 564b080..03cbc76 100644 --- a/chrome/browser/views/bug_report_view.cc +++ b/chrome/browser/views/bug_report_view.cc @@ -4,6 +4,9 @@ #include "chrome/browser/views/bug_report_view.h" +#include <string> +#include <vector> + #include "app/combobox_model.h" #include "app/l10n_util.h" #include "base/file_path.h" @@ -12,7 +15,6 @@ #include "base/path_service.h" #include "base/utf_string_conversions.h" #include "base/waitable_event.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/bug_report_util.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" @@ -23,6 +25,7 @@ #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/net/url_fetcher.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" @@ -191,7 +194,7 @@ bool GetLastScreenshot(std::string* image_str) { #endif } -} // namespace +} // namespace namespace browser { @@ -276,8 +279,7 @@ BugReportView::BugReportView(Profile* profile, TabContents* tab) #endif // Retrieve the application version info. - scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); if (version_info.get()) { version_ = version_info->product_name() + L" - " + version_info->file_version() + @@ -455,7 +457,7 @@ gfx::Size BugReportView::GetPreferredSize() { #else IDS_BUGREPORT_DIALOG_HEIGHT_LINES); #endif - return size; + return size; } void BugReportView::UpdateReportingControls(bool is_phishing_report) { diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index 116e9d5..383c941 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -471,8 +471,8 @@ 'target_name': 'chrome_version_info', 'type': '<(library)', 'sources': [ - 'app/chrome_version_info.cc', - 'app/chrome_version_info.h', + 'common/chrome_version_info.cc', + 'common/chrome_version_info.h', ], 'include_dirs': [ '<(DEPTH)', @@ -490,7 +490,7 @@ '<(SHARED_INTERMEDIATE_DIR)/build/LASTCHANGE', 'version_py_path': 'tools/build/version.py', 'version_path': 'VERSION', - 'template_input_path': 'app/chrome_version_info_posix.h.version', + 'template_input_path': 'common/chrome_version_info_posix.h.version', }, 'conditions': [ [ 'branding == "Chrome"', { @@ -512,7 +512,7 @@ '<(lastchange_path)', ], 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/chrome/app/chrome_version_info_posix.h', + '<(SHARED_INTERMEDIATE_DIR)/chrome/common/chrome_version_info_posix.h', ], 'action': [ 'python', diff --git a/chrome/app/chrome_version_info.cc b/chrome/common/chrome_version_info.cc index 577cb32..1b1d479 100644 --- a/chrome/app/chrome_version_info.cc +++ b/chrome/common/chrome_version_info.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/app/chrome_version_info.h" +#include "chrome/common/chrome_version_info.h" #include "base/basictypes.h" #include "base/file_version_info.h" #include "build/build_config.h" #if defined(OS_POSIX) && !defined(OS_MACOSX) -#include "chrome/app/chrome_version_info_posix.h" +#include "chrome/common/chrome_version_info_posix.h" // Posix files don't have per-file version information, so we get chrome // version information from chrome_version_info_posix.h, a generated header. @@ -39,7 +39,7 @@ class ChromeVersionInfoPosix : public FileVersionInfo { }; #endif -namespace chrome_app { +namespace chrome { FileVersionInfo* GetChromeVersionInfo() { #if defined(OS_WIN) || defined(OS_MACOSX) @@ -49,4 +49,4 @@ FileVersionInfo* GetChromeVersionInfo() { #endif } -} // namespace chrome_app +} // namespace chrome diff --git a/chrome/app/chrome_version_info.h b/chrome/common/chrome_version_info.h index 472bcf4..e3bfad71 100644 --- a/chrome/app/chrome_version_info.h +++ b/chrome/common/chrome_version_info.h @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_APP_CHROME_VERSION_INFO_H_ -#define CHROME_APP_CHROME_VERSION_INFO_H_ +#ifndef CHROME_COMMON_CHROME_VERSION_INFO_H_ +#define CHROME_COMMON_CHROME_VERSION_INFO_H_ class FileVersionInfo; -namespace chrome_app { +namespace chrome { // Creates a FileVersionInfo for the app, Chrome. Returns NULL in case of // error. The returned object should be deleted when you are done with it. FileVersionInfo* GetChromeVersionInfo(); -} +} // namespace chrome -#endif // CHROME_APP_CHROME_VERSION_INFO_H_ +#endif // CHROME_COMMON_CHROME_VERSION_INFO_H_ diff --git a/chrome/app/chrome_version_info_posix.h.version b/chrome/common/chrome_version_info_posix.h.version index 01295f2..56a8fea 100644 --- a/chrome/app/chrome_version_info_posix.h.version +++ b/chrome/common/chrome_version_info_posix.h.version @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_APP_CHROME_VERSION_INFO_POSIX_H_ -#define CHROME_APP_CHROME_VERSION_INFO_POSIX_H_ +#ifndef CHROME_COMMON_CHROME_VERSION_INFO_POSIX_H_ +#define CHROME_COMMON_CHROME_VERSION_INFO_POSIX_H_ #define COMPANY_NAME L"@COMPANY_FULLNAME@" #define FILE_DESCRIPTION L"@PRODUCT_FULLNAME@" @@ -23,4 +23,4 @@ #define COMMENTS L"" #define LEGAL_TRADEMARKS L"" -#endif // CHROME_APP_CHROME_VERSION_INFO_POSIX_H_ +#endif // CHROME_COMMON_CHROME_VERSION_INFO_POSIX_H_ diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 10d69a0..a4ade47 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -20,9 +20,9 @@ #include "base/third_party/nss/blapi.h" #include "base/third_party/nss/sha256.h" #include "base/utf_string_conversions.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/extensions/extension_action.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_error_utils.h" @@ -1040,7 +1040,7 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key, } scoped_ptr<FileVersionInfo> current_version_info( - chrome_app::GetChromeVersionInfo()); + chrome::GetChromeVersionInfo()); if (!current_version_info.get()) { DCHECK(false); return false; diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index 849565a..dcdbcb7 100644 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,12 +6,12 @@ #include "build/build_config.h" -#include <vector> - #if defined(OS_WIN) #include <windows.h> #endif +#include <vector> + #include "app/clipboard/clipboard.h" #include "app/clipboard/scoped_clipboard_writer.h" #include "app/resource_bundle.h" @@ -19,8 +19,8 @@ #include "base/file_version_info.h" #include "base/ref_counted.h" #include "base/string_util.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/render_messages.h" #include "chrome/common/socket_stream_dispatcher.h" #include "chrome/common/url_constants.h" @@ -29,10 +29,10 @@ #include "chrome/renderer/render_process.h" #include "chrome/renderer/render_thread.h" #include "googleurl/src/url_util.h" -#include "third_party/skia/include/core/SkBitmap.h" #include "third_party/WebKit/WebKit/chromium/public/WebKit.h" #include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" #include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "webkit/glue/scoped_clipboard_writer_glue.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/websocketstreamhandle_bridge.h" @@ -301,8 +301,7 @@ void ClearCache() { } std::string GetProductVersion() { - scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + scoped_ptr<FileVersionInfo> version_info(chrome::GetChromeVersionInfo()); std::string product("Chrome/"); product += version_info.get() ? WideToASCII(version_info->product_version()) : "0.0.0.0"; diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc index d49ae9a..6cc574b 100644 --- a/chrome/test/automation/automation_proxy.cc +++ b/chrome/test/automation/automation_proxy.cc @@ -1,9 +1,11 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/test/automation/automation_proxy.h" +#include <gtest/gtest.h> + #include <sstream> #include "base/basictypes.h" @@ -13,14 +15,13 @@ #include "base/process_util.h" #include "base/ref_counted.h" #include "base/waitable_event.h" -#include "chrome/app/chrome_version_info.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/test/automation/automation_constants.h" #include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/extension_proxy.h" #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/window_proxy.h" -#include <gtest/gtest.h> #include "ipc/ipc_descriptors.h" #if defined(OS_WIN) // TODO(port): Enable when dialog_delegate is ported. @@ -174,7 +175,7 @@ AutomationLaunchResult AutomationProxy::WaitForAppLaunch() { // Obtain our own version number and compare it to what the automation // provider sent. scoped_ptr<FileVersionInfo> file_version_info( - chrome_app::GetChromeVersionInfo()); + chrome::GetChromeVersionInfo()); DCHECK(file_version_info != NULL); std::string version_string( WideToASCII(file_version_info->file_version())); diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index 4966acf..f2eba67 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -46,13 +46,13 @@ #include "base/string_util.h" #include "base/test/test_file_util.h" #include "base/time.h" -#include "chrome/app/chrome_version_info.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/browser/pref_service.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/common/json_pref_store.h" #include "chrome/common/logging_chrome.h" #include "chrome/common/pref_names.h" @@ -165,7 +165,7 @@ class PageLoadTest : public UITest { // TODO(fmeawad): On Mac, the version retrieved here belongs to the test // module and not the chrome binary, need to be changed to chrome binary // instead. - file_info.reset(chrome_app::GetChromeVersionInfo()); + file_info.reset(chrome::GetChromeVersionInfo()); #endif // !defined(OS_WIN) std::wstring last_change = file_info->last_change(); test_log << "Last Change: "; diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc index a21e48a..cb36245 100644 --- a/chrome_frame/metrics_service.cc +++ b/chrome_frame/metrics_service.cc @@ -53,7 +53,7 @@ #include "base/string_util.h" #include "base/thread.h" #include "base/utf_string_conversions.h" -#include "chrome/app/chrome_version_info.h" +#include "chrome/common/chrome_version_info.h" #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/chrome_frame_distribution.h" #include "chrome/installer/util/google_update_settings.h" @@ -462,7 +462,7 @@ bool MetricsService::UploadData() { // static std::string MetricsService::GetVersionString() { scoped_ptr<FileVersionInfo> version_info( - chrome_app::GetChromeVersionInfo()); + chrome::GetChromeVersionInfo()); if (version_info.get()) { std::string version = WideToUTF8(version_info->product_version()); // Add the -F extensions to ensure that UMA data uploaded by ChromeFrame @@ -477,4 +477,3 @@ std::string MetricsService::GetVersionString() { return std::string(); } - |