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

Unified Diff: chrome/browser/search_engines/ui_thread_search_terms_data.cc

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search_engines/ui_thread_search_terms_data.cc
diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data.cc b/chrome/browser/search_engines/ui_thread_search_terms_data.cc
index ead1dc57695cfaea59bef7b33b0bdc6218a1ebcb..7fc76fe699429ce95552b2e8780b61e5977c33ce 100644
--- a/chrome/browser/search_engines/ui_thread_search_terms_data.cc
+++ b/chrome/browser/search_engines/ui_thread_search_terms_data.cc
@@ -17,13 +17,14 @@
#include "chrome/browser/search/search.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
+#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/chrome_version_info.h"
#include "chrome/common/pref_names.h"
#include "components/google/core/browser/google_url_tracker.h"
#include "components/google/core/browser/google_util.h"
#include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/search/search.h"
+#include "components/version_info/version_info.h"
#include "content/public/browser/browser_thread.h"
#include "ui/base/device_form_factor.h"
#include "url/gurl.h"
@@ -168,15 +169,15 @@ std::string UIThreadSearchTermsData::NTPIsThemedParam() const {
}
// It's acutally OK to call this method on any thread, but it's currently placed
-// in UIThreadSearchTermsData since SearchTermsData cannot depend on
-// VersionInfo.
+// in UIThreadSearchTermsData since SearchTermsData cannot depend on src/chrome
+// as it is shared with iOS.
std::string UIThreadSearchTermsData::GoogleImageSearchSource() const {
- chrome::VersionInfo version_info;
- std::string version(version_info.Name() + " " + version_info.Version());
- if (version_info.IsOfficialBuild())
+ std::string version(version_info::GetProductName() + " " +
+ version_info::GetVersionNumber());
+ if (version_info::IsOfficialBuild())
version += " (Official)";
- version += " " + version_info.OSType();
- std::string modifier(version_info.GetVersionStringModifier());
+ version += " " + version_info::GetOSType();
+ std::string modifier(chrome::GetChannelString());
if (!modifier.empty())
version += " " + modifier;
return version;

Powered by Google App Engine
This is Rietveld 408576698