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

Side by Side Diff: chrome/browser/component_updater/widevine_cdm_component_installer.cc

Issue 1740333002: Allow fallback from https to http for component update checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/widevine_cdm_component_installer.h" 5 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 #include <string> 10 #include <string>
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } // namespace 229 } // namespace
230 230
231 class WidevineCdmComponentInstallerTraits : public ComponentInstallerTraits { 231 class WidevineCdmComponentInstallerTraits : public ComponentInstallerTraits {
232 public: 232 public:
233 WidevineCdmComponentInstallerTraits(); 233 WidevineCdmComponentInstallerTraits();
234 ~WidevineCdmComponentInstallerTraits() override {} 234 ~WidevineCdmComponentInstallerTraits() override {}
235 235
236 private: 236 private:
237 // The following methods override ComponentInstallerTraits. 237 // The following methods override ComponentInstallerTraits.
238 bool CanAutoUpdate() const override; 238 bool CanAutoUpdate() const override;
239 bool RequiresNetworkEncryption() const override;
239 bool OnCustomInstall(const base::DictionaryValue& manifest, 240 bool OnCustomInstall(const base::DictionaryValue& manifest,
240 const base::FilePath& install_dir) override; 241 const base::FilePath& install_dir) override;
241 bool VerifyInstallation( 242 bool VerifyInstallation(
242 const base::DictionaryValue& manifest, 243 const base::DictionaryValue& manifest,
243 const base::FilePath& install_dir) const override; 244 const base::FilePath& install_dir) const override;
244 void ComponentReady( 245 void ComponentReady(
245 const base::Version& version, 246 const base::Version& version,
246 const base::FilePath& path, 247 const base::FilePath& path,
247 scoped_ptr<base::DictionaryValue> manifest) override; 248 scoped_ptr<base::DictionaryValue> manifest) override;
248 base::FilePath GetBaseDirectory() const override; 249 base::FilePath GetBaseDirectory() const override;
(...skipping 12 matching lines...) Expand all
261 DISALLOW_COPY_AND_ASSIGN(WidevineCdmComponentInstallerTraits); 262 DISALLOW_COPY_AND_ASSIGN(WidevineCdmComponentInstallerTraits);
262 }; 263 };
263 264
264 WidevineCdmComponentInstallerTraits::WidevineCdmComponentInstallerTraits() { 265 WidevineCdmComponentInstallerTraits::WidevineCdmComponentInstallerTraits() {
265 } 266 }
266 267
267 bool WidevineCdmComponentInstallerTraits::CanAutoUpdate() const { 268 bool WidevineCdmComponentInstallerTraits::CanAutoUpdate() const {
268 return true; 269 return true;
269 } 270 }
270 271
272 bool WidevineCdmComponentInstallerTraits::RequiresNetworkEncryption() const {
273 return false;
274 }
275
271 bool WidevineCdmComponentInstallerTraits::OnCustomInstall( 276 bool WidevineCdmComponentInstallerTraits::OnCustomInstall(
272 const base::DictionaryValue& manifest, 277 const base::DictionaryValue& manifest,
273 const base::FilePath& install_dir) { 278 const base::FilePath& install_dir) {
274 return true; 279 return true;
275 } 280 }
276 281
277 // Once the CDM is ready, check the CDM adapter. 282 // Once the CDM is ready, check the CDM adapter.
278 void WidevineCdmComponentInstallerTraits::ComponentReady( 283 void WidevineCdmComponentInstallerTraits::ComponentReady(
279 const base::Version& version, 284 const base::Version& version,
280 const base::FilePath& path, 285 const base::FilePath& path,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 scoped_ptr<ComponentInstallerTraits> traits( 378 scoped_ptr<ComponentInstallerTraits> traits(
374 new WidevineCdmComponentInstallerTraits); 379 new WidevineCdmComponentInstallerTraits);
375 // |cus| will take ownership of |installer| during installer->Register(cus). 380 // |cus| will take ownership of |installer| during installer->Register(cus).
376 DefaultComponentInstaller* installer = 381 DefaultComponentInstaller* installer =
377 new DefaultComponentInstaller(std::move(traits)); 382 new DefaultComponentInstaller(std::move(traits));
378 installer->Register(cus, base::Closure()); 383 installer->Register(cus, base::Closure());
379 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) 384 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
380 } 385 }
381 386
382 } // namespace component_updater 387 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698