summaryrefslogtreecommitdiffstats
path: root/android_webview/common
diff options
context:
space:
mode:
authortorne <torne@chromium.org>2014-11-04 08:30:56 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-04 16:32:03 +0000
commite72c9f4cc8e2d5abdf9ae4506abf94d5eb7a91d6 (patch)
treea3ab4051e0004b83a46232731aa0cd22be5a5426 /android_webview/common
parent65ce5accb99908e292b9766c3da6cf54d6cc337f (diff)
downloadchromium_src-e72c9f4cc8e2d5abdf9ae4506abf94d5eb7a91d6.zip
chromium_src-e72c9f4cc8e2d5abdf9ae4506abf94d5eb7a91d6.tar.gz
chromium_src-e72c9f4cc8e2d5abdf9ae4506abf94d5eb7a91d6.tar.bz2
android_webview: use chrome version information.
Replace the hardcoded version number used for the WebView's user agent with the real version number of the corresponding Chrome build. This uses the version information from src/chrome/VERSION; there is a pending bug to move this out of chrome/ (http://crbug.com/345538) which will not be impeded by this change as the location of the version info is obtained from build/util/version.gypi. BUG=297522 Review URL: https://codereview.chromium.org/695313002 Cr-Commit-Position: refs/heads/master@{#302614}
Diffstat (limited to 'android_webview/common')
-rw-r--r--android_webview/common/aw_content_client.cc6
-rw-r--r--android_webview/common/aw_version_info_values.h.version10
2 files changed, 12 insertions, 4 deletions
diff --git a/android_webview/common/aw_content_client.cc b/android_webview/common/aw_content_client.cc
index e20b7b4..b866bdf 100644
--- a/android_webview/common/aw_content_client.cc
+++ b/android_webview/common/aw_content_client.cc
@@ -4,6 +4,7 @@
#include "android_webview/common/aw_content_client.h"
+#include "android_webview/common/aw_version_info_values.h"
#include "base/basictypes.h"
#include "base/command_line.h"
#include "content/public/common/content_switches.h"
@@ -15,10 +16,7 @@
namespace {
std::string GetProduct() {
- // "Chrome/XX.0.0.0" identifies that this WebView is derived from the
- // corresponding Chromium version XX.
- // TODO(torne): Use chrome/VERSION file. See http://crbug.com/297522
- return "Chrome/40.0.0.0";
+ return "Chrome/" PRODUCT_VERSION;
}
}
diff --git a/android_webview/common/aw_version_info_values.h.version b/android_webview/common/aw_version_info_values.h.version
new file mode 100644
index 0000000..72faf97
--- /dev/null
+++ b/android_webview/common/aw_version_info_values.h.version
@@ -0,0 +1,10 @@
+// Copyright (c) 2014 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.
+
+#ifndef ANDROID_WEBVIEW_COMMON_AW_VERSION_INFO_VALUES_H_
+#define ANDROID_WEBVIEW_COMMON_AW_VERSION_INFO_VALUES_H_
+
+#define PRODUCT_VERSION "@MAJOR@.@MINOR@.@BUILD@.@PATCH@"
+
+#endif // ANDROID_WEBVIEW_COMMON_AW_VERSION_INFO_VALUES_H_