summaryrefslogtreecommitdiffstats
path: root/components/update_client
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2015-08-18 20:26:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-19 03:27:46 +0000
commit37be69cfdb84f4fdabcb779f443d18bbc04f1ffb (patch)
treecb8baf96f447aa5cf415ae19f9f92aa9f43d2d11 /components/update_client
parentec748bc5560f56d838178b07313e59bd4136f7ee (diff)
downloadchromium_src-37be69cfdb84f4fdabcb779f443d18bbc04f1ffb.zip
chromium_src-37be69cfdb84f4fdabcb779f443d18bbc04f1ffb.tar.gz
chromium_src-37be69cfdb84f4fdabcb779f443d18bbc04f1ffb.tar.bz2
Revert of base: Remove using:: declaration from version.h header. (patchset #24 id:450001 of https://codereview.chromium.org/1281313003/ )
Reason for revert: Broke all official bots, e.g. http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/1926/steps/compile/logs/stdio c:\b\build\slave\google-chrome-rel-win\build\src\chrome\browser\component_updater\pepper_flash_component_installer.cc(326) :error C3861: 'Version': identifier not found Original issue's description: > base: Remove using:: declaration from version.h header. > > BUG=None > R=brettw@chromium.org > > Committed: https://crrev.com/9c2f5dc9c732beb936b41d073bf5ec7adefb0872 > Cr-Commit-Position: refs/heads/master@{#344088} TBR=brettw@chromium.org,tfarina@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=None Review URL: https://codereview.chromium.org/1301883002 Cr-Commit-Position: refs/heads/master@{#344138}
Diffstat (limited to 'components/update_client')
-rw-r--r--components/update_client/action_update_check.cc8
-rw-r--r--components/update_client/crx_update_item.h4
-rw-r--r--components/update_client/test_installer.cc2
-rw-r--r--components/update_client/test_installer.h2
-rw-r--r--components/update_client/update_client.h2
-rw-r--r--components/update_client/update_client_unittest.cc28
-rw-r--r--components/update_client/update_response.cc4
7 files changed, 25 insertions, 25 deletions
diff --git a/components/update_client/action_update_check.cc b/components/update_client/action_update_check.cc
index aeb455b..d68940e 100644
--- a/components/update_client/action_update_check.cc
+++ b/components/update_client/action_update_check.cc
@@ -26,8 +26,8 @@ namespace update_client {
namespace {
// Returns true if the |proposed| version is newer than |current| version.
-bool IsVersionNewer(const base::Version& current, const std::string& proposed) {
- base::Version proposed_ver(proposed);
+bool IsVersionNewer(const Version& current, const std::string& proposed) {
+ Version proposed_ver(proposed);
return proposed_ver.IsValid() && current.CompareTo(proposed_ver) < 0;
}
@@ -68,7 +68,7 @@ void ActionUpdateCheck::Run(UpdateContext* update_context, Callback callback) {
item->crx_urls.clear();
item->crx_diffurls.clear();
item->previous_version = crx_component.version;
- item->next_version = base::Version();
+ item->next_version = Version();
item->previous_fp = crx_component.fingerprint;
item->next_fp.clear();
item->on_demand = update_context->is_foreground;
@@ -154,7 +154,7 @@ void ActionUpdateCheck::OnUpdateCheckSucceeded(
}
// Parse the members of the result and queue an upgrade for this CRX.
- crx->next_version = base::Version(it->manifest.version);
+ crx->next_version = Version(it->manifest.version);
VLOG(1) << "Update found for CRX: " << crx->id;
diff --git a/components/update_client/crx_update_item.h b/components/update_client/crx_update_item.h
index 34fed9d..a9cf171 100644
--- a/components/update_client/crx_update_item.h
+++ b/components/update_client/crx_update_item.h
@@ -85,8 +85,8 @@ struct CrxUpdateItem {
std::vector<GURL> crx_diffurls;
// The from/to version and fingerprint values.
- base::Version previous_version;
- base::Version next_version;
+ Version previous_version;
+ Version next_version;
std::string previous_fp;
std::string next_fp;
diff --git a/components/update_client/test_installer.cc b/components/update_client/test_installer.cc
index 7a29199..ad6015b 100644
--- a/components/update_client/test_installer.cc
+++ b/components/update_client/test_installer.cc
@@ -62,7 +62,7 @@ bool VersionedTestInstaller::Install(const base::DictionaryValue& manifest,
const base::FilePath& unpack_path) {
std::string version_string;
manifest.GetStringASCII("version", &version_string);
- base::Version version(version_string);
+ Version version(version_string.c_str());
base::FilePath path;
path = install_directory_.AppendASCII(version.GetString());
diff --git a/components/update_client/test_installer.h b/components/update_client/test_installer.h
index 17ea290..44a6f28 100644
--- a/components/update_client/test_installer.h
+++ b/components/update_client/test_installer.h
@@ -76,7 +76,7 @@ class VersionedTestInstaller : public TestInstaller {
~VersionedTestInstaller() override;
base::FilePath install_directory_;
- base::Version current_version_;
+ Version current_version_;
};
} // namespace update_client
diff --git a/components/update_client/update_client.h b/components/update_client/update_client.h
index 012a59d..29b80e0 100644
--- a/components/update_client/update_client.h
+++ b/components/update_client/update_client.h
@@ -188,7 +188,7 @@ struct CrxComponent {
// The current version if the CRX is updated. Otherwise, "0" or "0.0" if
// the CRX is installed.
- base::Version version;
+ Version version;
std::string fingerprint; // Optional.
std::string name; // Optional.
diff --git a/components/update_client/update_client_unittest.cc b/components/update_client/update_client_unittest.cc
index 73c586f..0ae4cc2 100644
--- a/components/update_client/update_client_unittest.cc
+++ b/components/update_client/update_client_unittest.cc
@@ -202,7 +202,7 @@ TEST_F(UpdateClientTest, OneCrxNoUpdate) {
CrxComponent crx;
crx.name = "test_jebg";
crx.pk_hash.assign(jebg_hash, jebg_hash + arraysize(jebg_hash));
- crx.version = base::Version("0.9");
+ crx.version = Version("0.9");
crx.installer = new TestInstaller;
components->push_back(crx);
}
@@ -302,13 +302,13 @@ TEST_F(UpdateClientTest, TwoCrxUpdateNoUpdate) {
CrxComponent crx1;
crx1.name = "test_jebg";
crx1.pk_hash.assign(jebg_hash, jebg_hash + arraysize(jebg_hash));
- crx1.version = base::Version("0.9");
+ crx1.version = Version("0.9");
crx1.installer = new TestInstaller;
CrxComponent crx2;
crx2.name = "test_abag";
crx2.pk_hash.assign(abag_hash, abag_hash + arraysize(abag_hash));
- crx2.version = base::Version("2.2");
+ crx2.version = Version("2.2");
crx2.installer = new TestInstaller;
components->push_back(crx1);
@@ -485,13 +485,13 @@ TEST_F(UpdateClientTest, TwoCrxUpdate) {
CrxComponent crx1;
crx1.name = "test_jebg";
crx1.pk_hash.assign(jebg_hash, jebg_hash + arraysize(jebg_hash));
- crx1.version = base::Version("0.9");
+ crx1.version = Version("0.9");
crx1.installer = new TestInstaller;
CrxComponent crx2;
crx2.name = "test_ihfo";
crx2.pk_hash.assign(ihfo_hash, ihfo_hash + arraysize(ihfo_hash));
- crx2.version = base::Version("0.8");
+ crx2.version = Version("0.8");
crx2.installer = new TestInstaller;
components->push_back(crx1);
@@ -726,13 +726,13 @@ TEST_F(UpdateClientTest, TwoCrxUpdateDownloadTimeout) {
CrxComponent crx1;
crx1.name = "test_jebg";
crx1.pk_hash.assign(jebg_hash, jebg_hash + arraysize(jebg_hash));
- crx1.version = base::Version("0.9");
+ crx1.version = Version("0.9");
crx1.installer = new TestInstaller;
CrxComponent crx2;
crx2.name = "test_ihfo";
crx2.pk_hash.assign(ihfo_hash, ihfo_hash + arraysize(ihfo_hash));
- crx2.version = base::Version("0.8");
+ crx2.version = Version("0.8");
crx2.installer = new TestInstaller;
components->push_back(crx1);
@@ -973,9 +973,9 @@ TEST_F(UpdateClientTest, OneCrxDiffUpdate) {
crx.pk_hash.assign(ihfo_hash, ihfo_hash + arraysize(ihfo_hash));
crx.installer = installer;
if (num_calls == 1) {
- crx.version = base::Version("0.8");
+ crx.version = Version("0.8");
} else if (num_calls == 2) {
- crx.version = base::Version("1.0");
+ crx.version = Version("1.0");
} else {
NOTREACHED();
}
@@ -1258,7 +1258,7 @@ TEST_F(UpdateClientTest, OneCrxInstallError) {
CrxComponent crx;
crx.name = "test_jebg";
crx.pk_hash.assign(jebg_hash, jebg_hash + arraysize(jebg_hash));
- crx.version = base::Version("0.9");
+ crx.version = Version("0.9");
crx.installer = installer;
components->push_back(crx);
}
@@ -1435,9 +1435,9 @@ TEST_F(UpdateClientTest, OneCrxDiffUpdateFailsFullUpdateSucceeds) {
crx.pk_hash.assign(ihfo_hash, ihfo_hash + arraysize(ihfo_hash));
crx.installer = installer;
if (num_calls == 1) {
- crx.version = base::Version("0.8");
+ crx.version = Version("0.8");
} else if (num_calls == 2) {
- crx.version = base::Version("1.0");
+ crx.version = Version("1.0");
} else {
NOTREACHED();
}
@@ -1713,7 +1713,7 @@ TEST_F(UpdateClientTest, OneCrxNoUpdateQueuedCall) {
CrxComponent crx;
crx.name = "test_jebg";
crx.pk_hash.assign(jebg_hash, jebg_hash + arraysize(jebg_hash));
- crx.version = base::Version("0.9");
+ crx.version = Version("0.9");
crx.installer = new TestInstaller;
components->push_back(crx);
}
@@ -1818,7 +1818,7 @@ TEST_F(UpdateClientTest, OneCrxInstall) {
CrxComponent crx;
crx.name = "test_jebg";
crx.pk_hash.assign(jebg_hash, jebg_hash + arraysize(jebg_hash));
- crx.version = base::Version("0.0");
+ crx.version = Version("0.0");
crx.installer = new TestInstaller;
components->push_back(crx);
diff --git a/components/update_client/update_response.cc b/components/update_client/update_response.cc
index e2ceaf9..c0996fc 100644
--- a/components/update_client/update_response.cc
+++ b/components/update_client/update_response.cc
@@ -156,7 +156,7 @@ bool ParseManifestTag(xmlNode* manifest,
*error = "Missing version for manifest.";
return false;
}
- base::Version version(result->manifest.version);
+ Version version(result->manifest.version);
if (!version.IsValid()) {
*error = "Invalid version: '";
*error += result->manifest.version;
@@ -168,7 +168,7 @@ bool ParseManifestTag(xmlNode* manifest,
result->manifest.browser_min_version =
GetAttribute(manifest, "prodversionmin");
if (result->manifest.browser_min_version.length()) {
- base::Version browser_min_version(result->manifest.browser_min_version);
+ Version browser_min_version(result->manifest.browser_min_version);
if (!browser_min_version.IsValid()) {
*error = "Invalid prodversionmin: '";
*error += result->manifest.browser_min_version;