summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 20:28:42 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 20:28:42 +0000
commit0211f57eabdc1a3e34aee1e1629c26e93b803ded (patch)
tree3bcbab3506e5f3dbcbc99825529cc803d223b017 /chrome/test/automation
parent1f8322043d302eb0f6a050a21d2f0f9a8c1df71e (diff)
downloadchromium_src-0211f57eabdc1a3e34aee1e1629c26e93b803ded.zip
chromium_src-0211f57eabdc1a3e34aee1e1629c26e93b803ded.tar.gz
chromium_src-0211f57eabdc1a3e34aee1e1629c26e93b803ded.tar.bz2
Refactor version-getting info into a chrome::VersionInfo object.
I was trying to replace wstring usage in base::FileVersionInfo, but that class is rather Windows-specific with strange fields like "private_build()" where the value and encoding aren't clear. 95% of the users of FileVersionInfo actually just care about the current Chrome version, so we can provide a much simpler interface for them. We still use FileVersionInfo for retrieving information from e.g. plugin DLLs, but in those cases the usage is clearer. Review URL: http://codereview.chromium.org/3135028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/automation_messages_internal.h2
-rw-r--r--chrome/test/automation/automation_proxy.cc10
2 files changed, 4 insertions, 8 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index 8e30bbc..b08529b 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -40,7 +40,7 @@ IPC_BEGIN_MESSAGES(Automation)
// in the app (the app is not fully up at this point). The parameter to this
// message is the version string of the automation provider. This parameter
// is defined to be the version string as returned by
- // FileVersionInfo::file_version().
+ // chrome::VersionInfo::Version().
// The client can choose to use this version string to decide whether or not
// it can talk to the provider.
IPC_MESSAGE_ROUTED1(AutomationMsg_Hello, std::string)
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index 31e339b..3f6eb64 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -9,7 +9,6 @@
#include <sstream>
#include "base/basictypes.h"
-#include "base/file_version_info.h"
#include "base/logging.h"
#include "base/platform_thread.h"
#include "base/process_util.h"
@@ -174,16 +173,13 @@ AutomationLaunchResult AutomationProxy::WaitForAppLaunch() {
if (perform_version_check_) {
// Obtain our own version number and compare it to what the automation
// provider sent.
- scoped_ptr<FileVersionInfo> file_version_info(
- chrome::GetChromeVersionInfo());
- DCHECK(file_version_info != NULL);
- std::string version_string(
- WideToASCII(file_version_info->file_version()));
+ chrome::VersionInfo version_info;
+ DCHECK(version_info.is_valid());
// Note that we use a simple string comparison since we expect the version
// to be a punctuated numeric string. Consider using base/Version if we
// ever need something more complicated here.
- if (server_version_ != version_string) {
+ if (server_version_ != version_info.Version()) {
result = AUTOMATION_VERSION_MISMATCH;
}
}