Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Side by Side Diff: components/component_updater/default_component_installer_unittest.cc

Issue 2205693004: Rename and repurpose ComponentInstallerTraits::CanAutoUpdate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cus-gp
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/component_updater/default_component_installer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iterator> 5 #include <iterator>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 class FakeInstallerTraits : public ComponentInstallerTraits { 68 class FakeInstallerTraits : public ComponentInstallerTraits {
69 public: 69 public:
70 ~FakeInstallerTraits() override {} 70 ~FakeInstallerTraits() override {}
71 71
72 bool VerifyInstallation(const base::DictionaryValue& manifest, 72 bool VerifyInstallation(const base::DictionaryValue& manifest,
73 const base::FilePath& dir) const override { 73 const base::FilePath& dir) const override {
74 return true; 74 return true;
75 } 75 }
76 76
77 bool CanAutoUpdate() const override { return true; } 77 bool SupportsGroupPolicyEnabledComponentUpdates() const override {
78 return false;
79 }
78 80
79 bool RequiresNetworkEncryption() const override { return true; } 81 bool RequiresNetworkEncryption() const override { return true; }
80 82
81 bool OnCustomInstall(const base::DictionaryValue& manifest, 83 bool OnCustomInstall(const base::DictionaryValue& manifest,
82 const base::FilePath& install_dir) override { 84 const base::FilePath& install_dir) override {
83 return true; 85 return true;
84 } 86 }
85 87
86 void ComponentReady( 88 void ComponentReady(
87 const base::Version& version, 89 const base::Version& version,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 std::vector<uint8_t>(std::begin(kSha256Hash), std::end(kSha256Hash)), 224 std::vector<uint8_t>(std::begin(kSha256Hash), std::end(kSha256Hash)),
223 component.pk_hash); 225 component.pk_hash);
224 EXPECT_EQ(base::Version("0.0.0.0"), component.version); 226 EXPECT_EQ(base::Version("0.0.0.0"), component.version);
225 EXPECT_TRUE(component.fingerprint.empty()); 227 EXPECT_TRUE(component.fingerprint.empty());
226 EXPECT_STREQ("fake name", component.name.c_str()); 228 EXPECT_STREQ("fake name", component.name.c_str());
227 EXPECT_EQ(expected_attrs, component.installer_attributes); 229 EXPECT_EQ(expected_attrs, component.installer_attributes);
228 EXPECT_TRUE(component.requires_network_encryption); 230 EXPECT_TRUE(component.requires_network_encryption);
229 } 231 }
230 232
231 } // namespace component_updater 233 } // namespace component_updater
OLDNEW
« no previous file with comments | « components/component_updater/default_component_installer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698