diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/bug_report_util.cc | 12 | ||||
-rw-r--r-- | chrome/browser/diagnostics/recon_diagnostics.cc | 4 | ||||
-rw-r--r-- | chrome/browser/dom_ui/gpu_internals_ui.cc | 30 | ||||
-rw-r--r-- | chrome/browser/dom_ui/net_internals_ui.cc | 30 | ||||
-rw-r--r-- | chrome/browser/dom_ui/options/about_page_handler.cc | 1 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_updater.cc | 6 | ||||
-rw-r--r-- | chrome/browser/memory_details_mac.cc | 9 | ||||
-rw-r--r-- | chrome/browser/memory_details_win.cc | 3 | ||||
-rw-r--r-- | chrome/browser/metrics/metrics_log.cc | 5 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/protocol_manager.cc | 2 | ||||
-rw-r--r-- | chrome/browser/sync/glue/sync_backend_host.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/views/about_chrome_view.cc | 5 | ||||
-rw-r--r-- | chrome/browser/upgrade_detector.cc | 4 |
13 files changed, 37 insertions, 79 deletions
diff --git a/chrome/browser/bug_report_util.cc b/chrome/browser/bug_report_util.cc index 28cc685..b89d742 100644 --- a/chrome/browser/bug_report_util.cc +++ b/chrome/browser/bug_report_util.cc @@ -309,13 +309,11 @@ void BugReportUtil::SendReport(Profile* profile, // Add the Chrome version chrome::VersionInfo version_info; - if (version_info.is_valid()) { - std::string chrome_version = version_info.Name() + " - " + - version_info.Version() + - " (" + version_info.LastChange() + ")"; - AddFeedbackData(&feedback_data, std::string(kChromeVersionTag), - chrome_version); - } + std::string chrome_version = version_info.Name() + " - " + + version_info.Version() + + " (" + version_info.LastChange() + ")"; + AddFeedbackData(&feedback_data, std::string(kChromeVersionTag), + chrome_version); // Add OS version (eg, for WinXP SP2: "5.1.2600 Service Pack 2"). std::string os_version = ""; diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc index f657fef..0a572f3 100644 --- a/chrome/browser/diagnostics/recon_diagnostics.cc +++ b/chrome/browser/diagnostics/recon_diagnostics.cc @@ -117,10 +117,6 @@ class VersionTest : public DiagnosticTest { virtual bool ExecuteImpl(DiagnosticsModel::Observer* observer) { chrome::VersionInfo version_info; - if (!version_info.is_valid()) { - RecordFailure(ASCIIToUTF16("No Version")); - return true; - } std::string current_version = version_info.Version(); if (current_version.empty()) { RecordFailure(ASCIIToUTF16("Empty Version")); diff --git a/chrome/browser/dom_ui/gpu_internals_ui.cc b/chrome/browser/dom_ui/gpu_internals_ui.cc index 9b93bfb..9b2b58f 100644 --- a/chrome/browser/dom_ui/gpu_internals_ui.cc +++ b/chrome/browser/dom_ui/gpu_internals_ui.cc @@ -206,23 +206,19 @@ Value* GpuMessageHandler::OnRequestClientInfo(const ListValue* list) { chrome::VersionInfo version_info; - if (!version_info.is_valid()) { - DLOG(ERROR) << "Unable to create chrome::VersionInfo"; - } else { - // We have everything we need to send the right values. - dict->SetString("version", version_info.Version()); - dict->SetString("cl", version_info.LastChange()); - dict->SetString("version_mod", - platform_util::GetVersionStringModifier()); - dict->SetString("official", - l10n_util::GetStringUTF16( - version_info.IsOfficialBuild() ? - IDS_ABOUT_VERSION_OFFICIAL - : IDS_ABOUT_VERSION_UNOFFICIAL)); - - dict->SetString("command_line", - CommandLine::ForCurrentProcess()->command_line_string()); - } + // We have everything we need to send the right values. + dict->SetString("version", version_info.Version()); + dict->SetString("cl", version_info.LastChange()); + dict->SetString("version_mod", + platform_util::GetVersionStringModifier()); + dict->SetString("official", + l10n_util::GetStringUTF16( + version_info.IsOfficialBuild() ? + IDS_ABOUT_VERSION_OFFICIAL + : IDS_ABOUT_VERSION_UNOFFICIAL)); + + dict->SetString("command_line", + CommandLine::ForCurrentProcess()->command_line_string()); return dict; } diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc index f44ac9e..1f81022 100644 --- a/chrome/browser/dom_ui/net_internals_ui.cc +++ b/chrome/browser/dom_ui/net_internals_ui.cc @@ -537,23 +537,19 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( chrome::VersionInfo version_info; - if (!version_info.is_valid()) { - DLOG(ERROR) << "Unable to create chrome::VersionInfo"; - } else { - // We have everything we need to send the right values. - dict->SetString("version", version_info.Version()); - dict->SetString("cl", version_info.LastChange()); - dict->SetString("version_mod", - platform_util::GetVersionStringModifier()); - dict->SetString("official", - l10n_util::GetStringUTF16( - version_info.IsOfficialBuild() ? - IDS_ABOUT_VERSION_OFFICIAL - : IDS_ABOUT_VERSION_UNOFFICIAL)); - - dict->SetString("command_line", - CommandLine::ForCurrentProcess()->command_line_string()); - } + // We have everything we need to send the right values. + dict->SetString("version", version_info.Version()); + dict->SetString("cl", version_info.LastChange()); + dict->SetString("version_mod", + platform_util::GetVersionStringModifier()); + dict->SetString("official", + l10n_util::GetStringUTF16( + version_info.IsOfficialBuild() ? + IDS_ABOUT_VERSION_OFFICIAL + : IDS_ABOUT_VERSION_UNOFFICIAL)); + + dict->SetString("command_line", + CommandLine::ForCurrentProcess()->command_line_string()); CallJavascriptFunction(L"g_browser.receivedClientInfo", dict); diff --git a/chrome/browser/dom_ui/options/about_page_handler.cc b/chrome/browser/dom_ui/options/about_page_handler.cc index 71f994f7..66420be 100644 --- a/chrome/browser/dom_ui/options/about_page_handler.cc +++ b/chrome/browser/dom_ui/options/about_page_handler.cc @@ -143,7 +143,6 @@ void AboutPageHandler::GetLocalizedValues(DictionaryValue* localized_strings) { // browser version chrome::VersionInfo version_info; - DCHECK(version_info.is_valid()); std::string browser_version = version_info.Version(); std::string version_modifier = platform_util::GetVersionStringModifier(); diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index d143052..1ebf65b 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -827,10 +827,8 @@ std::vector<int> ExtensionUpdater::DetermineUpdates( // First determine the browser version if we haven't already. if (!browser_version.get()) { chrome::VersionInfo version_info; - if (version_info.is_valid()) { - browser_version.reset(Version::GetVersionFromString( - version_info.Version())); - } + browser_version.reset(Version::GetVersionFromString( + version_info.Version())); } scoped_ptr<Version> browser_min_version( Version::GetVersionFromString(update->browser_min_version)); diff --git a/chrome/browser/memory_details_mac.cc b/chrome/browser/memory_details_mac.cc index b17d25f..08fced1 100644 --- a/chrome/browser/memory_details_mac.cc +++ b/chrome/browser/memory_details_mac.cc @@ -201,13 +201,8 @@ void MemoryDetails::CollectProcessDataChrome( info.type = ChildProcessInfo::UNKNOWN_PROCESS; chrome::VersionInfo version_info; - if (version_info.is_valid()) { - info.product_name = ASCIIToWide(version_info.Name()); - info.version = ASCIIToWide(version_info.Version()); - } else { - info.product_name = process_data_[CHROME_BROWSER].name; - info.version = L""; - } + info.product_name = ASCIIToWide(version_info.Name()); + info.version = ASCIIToWide(version_info.Version()); // Check if this is one of the child processes whose data we collected // on the IO thread, and if so copy over that data. diff --git a/chrome/browser/memory_details_win.cc b/chrome/browser/memory_details_win.cc index 959cebd..a3ea337 100644 --- a/chrome/browser/memory_details_win.cc +++ b/chrome/browser/memory_details_win.cc @@ -121,8 +121,7 @@ void MemoryDetails::CollectProcessData( TCHAR name[MAX_PATH]; if (index2 == CHROME_BROWSER || index2 == CHROME_NACL_PROCESS) { chrome::VersionInfo version_info; - if (version_info.is_valid()) - info.version = ASCIIToWide(version_info.Version()); + info.version = ASCIIToWide(version_info.Version()); // Check if this is one of the child processes whose data we collected // on the IO thread, and if so copy over that data. for (size_t child = 0; child < child_info.size(); child++) { diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc index d0a1f01..14f6ba9 100644 --- a/chrome/browser/metrics/metrics_log.cc +++ b/chrome/browser/metrics/metrics_log.cc @@ -71,11 +71,6 @@ std::string MetricsLog::GetInstallDate() const { // static std::string MetricsLog::GetVersionString() { chrome::VersionInfo version_info; - if (!version_info.is_valid()) { - NOTREACHED() << "Unable to retrieve version info."; - return std::string(); - } - std::string version = version_info.Version(); if (!version_extension_.empty()) version += version_extension_; diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc index 8e29489..e620c11 100644 --- a/chrome/browser/safe_browsing/protocol_manager.cc +++ b/chrome/browser/safe_browsing/protocol_manager.cc @@ -119,7 +119,7 @@ SafeBrowsingProtocolManager::SafeBrowsingProtocolManager( next_update_sec_ = base::RandInt(60, kSbTimerStartIntervalSec); chrome::VersionInfo version_info; - if (!version_info.is_valid() || version_info.Version().empty()) + if (version_info.Version().empty()) version_ = "0.1"; else version_ = version_info.Version(); diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc index 4dafe24..b34943b33 100644 --- a/chrome/browser/sync/glue/sync_backend_host.cc +++ b/chrome/browser/sync/glue/sync_backend_host.cc @@ -547,11 +547,6 @@ std::string MakeUserAgentForSyncapi() { user_agent += "MAC "; #endif chrome::VersionInfo version_info; - if (!version_info.is_valid()) { - DLOG(ERROR) << "Unable to create chrome::VersionInfo object"; - return user_agent; - } - user_agent += version_info.Version(); user_agent += " (" + version_info.LastChange() + ")"; if (!version_info.IsOfficialBuild()) diff --git a/chrome/browser/ui/views/about_chrome_view.cc b/chrome/browser/ui/views/about_chrome_view.cc index 9e58f04..7d53af6 100644 --- a/chrome/browser/ui/views/about_chrome_view.cc +++ b/chrome/browser/ui/views/about_chrome_view.cc @@ -151,11 +151,6 @@ void AboutChromeView::Init() { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); chrome::VersionInfo version_info; - if (!version_info.is_valid()) { - NOTREACHED() << L"Failed to initialize about window"; - return; - } - current_version_ = ASCIIToWide(version_info.Version()); std::string version_modifier = platform_util::GetVersionStringModifier(); diff --git a/chrome/browser/upgrade_detector.cc b/chrome/browser/upgrade_detector.cc index 7f3161d..2e0eeed 100644 --- a/chrome/browser/upgrade_detector.cc +++ b/chrome/browser/upgrade_detector.cc @@ -113,10 +113,6 @@ class DetectUpgradeTask : public Task { // Get the version of the currently *running* instance of Chrome. chrome::VersionInfo version_info; - if (!version_info.is_valid()) { - NOTREACHED() << "Failed to get current file version"; - return; - } scoped_ptr<Version> running_version( Version::GetVersionFromString(version_info.Version())); if (running_version.get() == NULL) { |