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

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

Issue 2154773002: Implement Just-In-Time Flash updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First Review Pass 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user_whitelist_installer.h " 5 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h "
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 bool RequiresNetworkEncryption() const override; 254 bool RequiresNetworkEncryption() const override;
255 bool OnCustomInstall(const base::DictionaryValue& manifest, 255 bool OnCustomInstall(const base::DictionaryValue& manifest,
256 const base::FilePath& install_dir) override; 256 const base::FilePath& install_dir) override;
257 void ComponentReady(const base::Version& version, 257 void ComponentReady(const base::Version& version,
258 const base::FilePath& install_dir, 258 const base::FilePath& install_dir,
259 std::unique_ptr<base::DictionaryValue> manifest) override; 259 std::unique_ptr<base::DictionaryValue> manifest) override;
260 base::FilePath GetRelativeInstallDir() const override; 260 base::FilePath GetRelativeInstallDir() const override;
261 void GetHash(std::vector<uint8_t>* hash) const override; 261 void GetHash(std::vector<uint8_t>* hash) const override;
262 std::string GetName() const override; 262 std::string GetName() const override;
263 update_client::InstallerAttributes GetInstallerAttributes() const override; 263 update_client::InstallerAttributes GetInstallerAttributes() const override;
264 void AddMimeTypes(std::vector<std::string>* mime_types) const override;
264 265
265 std::string crx_id_; 266 std::string crx_id_;
266 std::string name_; 267 std::string name_;
267 RawWhitelistReadyCallback callback_; 268 RawWhitelistReadyCallback callback_;
268 269
269 DISALLOW_COPY_AND_ASSIGN(SupervisedUserWhitelistComponentInstallerTraits); 270 DISALLOW_COPY_AND_ASSIGN(SupervisedUserWhitelistComponentInstallerTraits);
270 }; 271 };
271 272
272 bool SupervisedUserWhitelistComponentInstallerTraits::VerifyInstallation( 273 bool SupervisedUserWhitelistComponentInstallerTraits::VerifyInstallation(
273 const base::DictionaryValue& manifest, 274 const base::DictionaryValue& manifest,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 std::string SupervisedUserWhitelistComponentInstallerTraits::GetName() const { 320 std::string SupervisedUserWhitelistComponentInstallerTraits::GetName() const {
320 return name_; 321 return name_;
321 } 322 }
322 323
323 update_client::InstallerAttributes 324 update_client::InstallerAttributes
324 SupervisedUserWhitelistComponentInstallerTraits::GetInstallerAttributes() 325 SupervisedUserWhitelistComponentInstallerTraits::GetInstallerAttributes()
325 const { 326 const {
326 return update_client::InstallerAttributes(); 327 return update_client::InstallerAttributes();
327 } 328 }
328 329
330 void SupervisedUserWhitelistComponentInstallerTraits::AddMimeTypes(
331 std::vector<std::string>* mime_types) const {
332 }
333
329 class SupervisedUserWhitelistInstallerImpl 334 class SupervisedUserWhitelistInstallerImpl
330 : public SupervisedUserWhitelistInstaller, 335 : public SupervisedUserWhitelistInstaller,
331 public ProfileAttributesStorage::Observer { 336 public ProfileAttributesStorage::Observer {
332 public: 337 public:
333 SupervisedUserWhitelistInstallerImpl( 338 SupervisedUserWhitelistInstallerImpl(
334 ComponentUpdateService* cus, 339 ComponentUpdateService* cus,
335 ProfileAttributesStorage* profile_attributes_storage, 340 ProfileAttributesStorage* profile_attributes_storage,
336 PrefService* local_state); 341 PrefService* local_state);
337 ~SupervisedUserWhitelistInstallerImpl() override {} 342 ~SupervisedUserWhitelistInstallerImpl() override {}
338 343
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 638
634 // static 639 // static
635 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate( 640 void SupervisedUserWhitelistInstaller::TriggerComponentUpdate(
636 OnDemandUpdater* updater, 641 OnDemandUpdater* updater,
637 const std::string& crx_id) { 642 const std::string& crx_id) {
638 const bool result = updater->OnDemandUpdate(crx_id); 643 const bool result = updater->OnDemandUpdate(crx_id);
639 DCHECK(result); 644 DCHECK(result);
640 } 645 }
641 646
642 } // namespace component_updater 647 } // namespace component_updater
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698