| Index: chrome/test/chromedriver/chrome/browser_info.h
|
| diff --git a/chrome/test/chromedriver/chrome/browser_info.h b/chrome/test/chromedriver/chrome/browser_info.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e6f161b36a1f704f21f364cff36e8562a0585ef7
|
| --- /dev/null
|
| +++ b/chrome/test/chromedriver/chrome/browser_info.h
|
| @@ -0,0 +1,44 @@
|
| +// Copyright (c) 2013 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 CHROME_TEST_CHROMEDRIVER_CHROME_BROWSER_INFO_H_
|
| +#define CHROME_TEST_CHROMEDRIVER_CHROME_BROWSER_INFO_H_
|
| +
|
| +#include "chrome/test/chromedriver/chrome/status.h"
|
| +
|
| +// Content Shell and WebView have an empty product version and a fake user
|
| +// agent. There's no way to detect the actual version, so unless specified we
|
| +// assume it is tip of tree.
|
| +static const int kToTBuildNo = 9999;
|
| +
|
| +// Similarly, if the Blink Revision isn't given then assume it is tip of tree.
|
| +static const int kToTBlinkRevision = 999999;
|
| +
|
| +struct BrowserInfo {
|
| + BrowserInfo();
|
| + BrowserInfo(std::string browser_name_,
|
| + std::string browser_version_,
|
| + int build_no_,
|
| + int blink_revision_);
|
| +
|
| + std::string browser_name;
|
| + std::string browser_version;
|
| + int build_no;
|
| + int blink_revision;
|
| +};
|
| +
|
| +Status ParseBrowserInfo(const std::string& data,
|
| + BrowserInfo* browser_info);
|
| +
|
| +Status ParseBrowserString(const std::string& browser_string,
|
| + std::string* browser_name,
|
| + std::string* browser_version,
|
| + int* build_no);
|
| +
|
| +Status ParseBlinkVersionString(const std::string& blink_version,
|
| + int* blink_revision);
|
| +
|
| +bool IsGitHash(const std::string& revision);
|
| +
|
| +#endif // CHROME_TEST_CHROMEDRIVER_CHROME_BROWSER_INFO_H_
|
|
|