Skip to content

Commit

Permalink
Revert of Disallow non-namespaced use of base::Version. (patchset #2
Browse files Browse the repository at this point in the history
…id:20001 of https://codereview.chromium.org/2290173006/ )

Reason for revert:
Breaks Google Chrome Linux x64 builder, see http://crbug.com/639416#c16

Original issue's description:
> Disallow non-namespaced use of base::Version.
>
> This is a reland of
> https://crrev.com/0de2231894d4289190b8661ae40f9a6cc29fc910
>
> BUG=639416
>
> Committed: https://crrev.com/bc8e5f797c9fac1708ab7b27da4d96ec274c6ca0
> Cr-Commit-Position: refs/heads/master@{#415940}

TBR=thakis@chromium.org,pwnall@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=639416

Review-Url: https://codereview.chromium.org/2305433003
Cr-Commit-Position: refs/heads/master@{#415946}
  • Loading branch information
battre authored and Commit bot committed Sep 1, 2016
1 parent cdfa05e commit eae359b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions base/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,8 @@ BASE_EXPORT std::ostream& operator<<(std::ostream& stream, const Version& v);

} // namespace base

// TODO(xhwang) remove this when all users are updated to explicitly use the
// namespace
using base::Version;

#endif // BASE_VERSION_H_
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const uint8_t kSha2Hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20,

#if !defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD)
bool MakePepperFlashPluginInfo(const base::FilePath& flash_path,
const base::Version& flash_version,
const Version& flash_version,
bool out_of_process,
content::PepperPluginInfo* plugin_info) {
if (!flash_version.IsValid())
Expand Down Expand Up @@ -102,7 +102,7 @@ bool MakePepperFlashPluginInfo(const base::FilePath& flash_path,
// or component updated).
// |version| is the version of that Flash implementation.
void RegisterPepperFlashWithChrome(const base::FilePath& path,
const base::Version& version) {
const Version& version) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
content::PepperPluginInfo plugin_info;
if (!MakePepperFlashPluginInfo(path, version, true, &plugin_info))
Expand All @@ -127,7 +127,7 @@ void RegisterPepperFlashWithChrome(const base::FilePath& path,
break;
}

base::Version registered_version(base::UTF16ToUTF8(plugin.version));
Version registered_version(base::UTF16ToUTF8(plugin.version));

// If lower version, never register.
if (registered_version.IsValid() &&
Expand Down Expand Up @@ -242,7 +242,7 @@ void FlashComponentInstallerTraits::ComponentReady(
bool FlashComponentInstallerTraits::VerifyInstallation(
const base::DictionaryValue& manifest,
const base::FilePath& install_dir) const {
base::Version unused;
Version unused;
return chrome::CheckPepperFlashManifest(manifest, &unused);
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/policy/policy_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3807,7 +3807,7 @@ update_client::CrxComponent ComponentUpdaterPolicyTest::MakeCrxComponent(
// The component uses HTTPS only for network interception purposes.
update_client::CrxComponent crx_component;
crx_component.pk_hash.assign(std::begin(jebg_hash), std::end(jebg_hash));
crx_component.version = base::Version("0.9");
crx_component.version = Version("0.9");
crx_component.installer = scoped_refptr<MockInstaller>(new MockInstaller());
crx_component.requires_network_encryption = true;
crx_component.supports_group_policy_enable_component_updates =
Expand Down

0 comments on commit eae359b

Please sign in to comment.