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

Side by Side Diff: components/component_updater/default_component_installer.h

Issue 1872053002: Implement an API to allow passing an "ap" parameter to component updates. (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 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 #ifndef COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ 5 #ifndef COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_
6 #define COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ 6 #define COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 // Returns the directory that the installer will place versioned installs of 77 // Returns the directory that the installer will place versioned installs of
78 // the component into. 78 // the component into.
79 virtual base::FilePath GetBaseDirectory() const = 0; 79 virtual base::FilePath GetBaseDirectory() const = 0;
80 80
81 // Returns the component's SHA2 hash as raw bytes. 81 // Returns the component's SHA2 hash as raw bytes.
82 virtual void GetHash(std::vector<uint8_t>* hash) const = 0; 82 virtual void GetHash(std::vector<uint8_t>* hash) const = 0;
83 83
84 // Returns the human-readable name of the component. 84 // Returns the human-readable name of the component.
85 virtual std::string GetName() const = 0; 85 virtual std::string GetName() const = 0;
86
87 // Returns the additional parameters to be used in the update checks for
88 // this component. A compatible server may use this attribute to negotiate
89 // special update rules when issuing an update response.
90 // The current implementation restricts ap to ^([-+_=a-zA-Z0-9]{0,256})$
91 virtual std::string GetAp() const = 0;
86 }; 92 };
87 93
88 // A DefaultComponentInstaller is intended to be final, and not derived from. 94 // A DefaultComponentInstaller is intended to be final, and not derived from.
89 // Customization must be provided by passing a ComponentInstallerTraits object 95 // Customization must be provided by passing a ComponentInstallerTraits object
90 // to the constructor. 96 // to the constructor.
91 class DefaultComponentInstaller : public update_client::CrxInstaller { 97 class DefaultComponentInstaller : public update_client::CrxInstaller {
92 public: 98 public:
93 DefaultComponentInstaller( 99 DefaultComponentInstaller(
94 scoped_ptr<ComponentInstallerTraits> installer_traits); 100 scoped_ptr<ComponentInstallerTraits> installer_traits);
95 101
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 136 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
131 137
132 base::ThreadChecker thread_checker_; 138 base::ThreadChecker thread_checker_;
133 139
134 DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller); 140 DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller);
135 }; 141 };
136 142
137 } // namespace component_updater 143 } // namespace component_updater
138 144
139 #endif // COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ 145 #endif // COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/widevine_cdm_component_installer.cc ('k') | components/update_client/update_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698