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

Unified Diff: components/update_client/update_client.h

Issue 2102083002: Allow component installers to specify a map of installer attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/update_client/update_checker_unittest.cc ('k') | components/update_client/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/update_client.h
diff --git a/components/update_client/update_client.h b/components/update_client/update_client.h
index 0c0e42d20c8d62e838e7990ba37678befd1446be..5f1a8ebb7308ce92322b87d334911229cb93efda 100644
--- a/components/update_client/update_client.h
+++ b/components/update_client/update_client.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <map>
#include <memory>
#include <string>
#include <vector>
@@ -182,6 +183,10 @@ class CrxInstaller : public base::RefCountedThreadSafe<CrxInstaller> {
virtual ~CrxInstaller() {}
};
+// A dictionary of installer-specific, arbitrary name-value pairs, which
+// may be used in the update checks requests.
+using InstallerAttributes = std::map<std::string, std::string>;
+
// TODO(sorin): this structure will be refactored soon.
struct CrxComponent {
CrxComponent();
@@ -198,7 +203,12 @@ struct CrxComponent {
std::string fingerprint; // Optional.
std::string name; // Optional.
- std::string ap; // Optional. Must match ^[-+_=a-zA-Z0-9]{0,256}$
+
+ // Optional.
+ // Valid values for the name part of an attribute match
+ // ^[-_a-zA-Z0-9]{1,256}$ and valid values the value part of an attribute
+ // match ^[-.,;+_=a-zA-Z0-9]{0,256}$ .
+ InstallerAttributes installer_attributes;
// Specifies that the CRX can be background-downloaded in some cases.
// The default for this value is |true|.
« no previous file with comments | « components/update_client/update_checker_unittest.cc ('k') | components/update_client/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698