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

Side by Side Diff: chrome/browser/component_updater/pepper_flash_component_installer.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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/component_updater/pepper_flash_component_installer.h" 5 #include "chrome/browser/component_updater/pepper_flash_component_installer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 #endif // !defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) 168 #endif // !defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD)
169 169
170 #if defined(GOOGLE_CHROME_BUILD) 170 #if defined(GOOGLE_CHROME_BUILD)
171 class FlashComponentInstallerTraits : public ComponentInstallerTraits { 171 class FlashComponentInstallerTraits : public ComponentInstallerTraits {
172 public: 172 public:
173 FlashComponentInstallerTraits(); 173 FlashComponentInstallerTraits();
174 ~FlashComponentInstallerTraits() override {} 174 ~FlashComponentInstallerTraits() override {}
175 175
176 private: 176 private:
177 // The following methods override ComponentInstallerTraits. 177 // The following methods override ComponentInstallerTraits.
178 bool CanAutoUpdate() const override; 178 bool SupportsGroupPolicyEnabledComponentUpdates() const override;
179 bool RequiresNetworkEncryption() const override; 179 bool RequiresNetworkEncryption() const override;
180 bool OnCustomInstall(const base::DictionaryValue& manifest, 180 bool OnCustomInstall(const base::DictionaryValue& manifest,
181 const base::FilePath& install_dir) override; 181 const base::FilePath& install_dir) override;
182 bool VerifyInstallation(const base::DictionaryValue& manifest, 182 bool VerifyInstallation(const base::DictionaryValue& manifest,
183 const base::FilePath& install_dir) const override; 183 const base::FilePath& install_dir) const override;
184 void ComponentReady(const base::Version& version, 184 void ComponentReady(const base::Version& version,
185 const base::FilePath& path, 185 const base::FilePath& path,
186 std::unique_ptr<base::DictionaryValue> manifest) override; 186 std::unique_ptr<base::DictionaryValue> manifest) override;
187 base::FilePath GetRelativeInstallDir() const override; 187 base::FilePath GetRelativeInstallDir() const override;
188 void GetHash(std::vector<uint8_t>* hash) const override; 188 void GetHash(std::vector<uint8_t>* hash) const override;
189 std::string GetName() const override; 189 std::string GetName() const override;
190 update_client::InstallerAttributes GetInstallerAttributes() const override; 190 update_client::InstallerAttributes GetInstallerAttributes() const override;
191 std::vector<std::string> GetMimeTypes() const override; 191 std::vector<std::string> GetMimeTypes() const override;
192 192
193 DISALLOW_COPY_AND_ASSIGN(FlashComponentInstallerTraits); 193 DISALLOW_COPY_AND_ASSIGN(FlashComponentInstallerTraits);
194 }; 194 };
195 195
196 FlashComponentInstallerTraits::FlashComponentInstallerTraits() {} 196 FlashComponentInstallerTraits::FlashComponentInstallerTraits() {}
197 197
198 bool FlashComponentInstallerTraits::CanAutoUpdate() const { 198 bool FlashComponentInstallerTraits::SupportsGroupPolicyEnabledComponentUpdates()
199 return true; 199 const {
200 return false;
200 } 201 }
201 202
202 bool FlashComponentInstallerTraits::RequiresNetworkEncryption() const { 203 bool FlashComponentInstallerTraits::RequiresNetworkEncryption() const {
203 return false; 204 return false;
204 } 205 }
205 206
206 bool FlashComponentInstallerTraits::OnCustomInstall( 207 bool FlashComponentInstallerTraits::OnCustomInstall(
207 const base::DictionaryValue& manifest, 208 const base::DictionaryValue& manifest,
208 const base::FilePath& install_dir) { 209 const base::FilePath& install_dir) {
209 #if defined(OS_LINUX) 210 #if defined(OS_LINUX)
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 std::unique_ptr<ComponentInstallerTraits> traits( 284 std::unique_ptr<ComponentInstallerTraits> traits(
284 new FlashComponentInstallerTraits); 285 new FlashComponentInstallerTraits);
285 // |cus| will take ownership of |installer| during installer->Register(cus). 286 // |cus| will take ownership of |installer| during installer->Register(cus).
286 DefaultComponentInstaller* installer = 287 DefaultComponentInstaller* installer =
287 new DefaultComponentInstaller(std::move(traits)); 288 new DefaultComponentInstaller(std::move(traits));
288 installer->Register(cus, base::Closure()); 289 installer->Register(cus, base::Closure());
289 #endif // defined(GOOGLE_CHROME_BUILD) 290 #endif // defined(GOOGLE_CHROME_BUILD)
290 } 291 }
291 292
292 } // namespace component_updater 293 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698