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

Side by Side Diff: components/update_client/update_response.h

Issue 2252093002: Add support for Omaha cohorts to the component updater. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test Created 4 years, 3 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
« no previous file with comments | « components/update_client/update_checker.cc ('k') | components/update_client/update_response.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_UPDATE_CLIENT_UPDATE_RESPONSE_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_UPDATE_RESPONSE_H_
6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_RESPONSE_H_ 6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_RESPONSE_H_
7 7
8 #include <map>
9 #include <memory>
8 #include <string> 10 #include <string>
9 #include <vector> 11 #include <vector>
10 12
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "url/gurl.h" 14 #include "url/gurl.h"
13 15
14 namespace update_client { 16 namespace update_client {
15 17
16 // Parses responses for the update protocol version 3. 18 // Parses responses for the update protocol version 3.
17 // (https://github.com/google/omaha/blob/wiki/ServerProtocolV3.md) 19 // (https://github.com/google/omaha/blob/wiki/ServerProtocolV3.md)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 ~Result(); 94 ~Result();
93 95
94 std::string extension_id; 96 std::string extension_id;
95 97
96 // The list of fallback urls, for full and diff updates respectively. 98 // The list of fallback urls, for full and diff updates respectively.
97 // These urls are base urls; they don't include the filename. 99 // These urls are base urls; they don't include the filename.
98 std::vector<GURL> crx_urls; 100 std::vector<GURL> crx_urls;
99 std::vector<GURL> crx_diffurls; 101 std::vector<GURL> crx_diffurls;
100 102
101 Manifest manifest; 103 Manifest manifest;
104
105 // The server has instructed the client to set its [key] to [value] for each
106 // key-value pair in this string.
107 std::map<std::string, std::string> cohort_attrs;
108
109 // The following are the only allowed keys in |cohort_attrs|.
110 static const char kCohort[];
111 static const char kCohortHint[];
112 static const char kCohortName[];
102 }; 113 };
103 114
104 static const int kNoDaystart = -1; 115 static const int kNoDaystart = -1;
105 struct Results { 116 struct Results {
106 Results(); 117 Results();
107 Results(const Results& other); 118 Results(const Results& other);
108 ~Results(); 119 ~Results();
109 120
110 // This will be >= 0, or kNoDaystart if the <daystart> tag was not present. 121 // This will be >= 0, or kNoDaystart if the <daystart> tag was not present.
111 int daystart_elapsed_seconds; 122 int daystart_elapsed_seconds;
(...skipping 20 matching lines...) Expand all
132 143
133 // Adds parse error details to |errors_| string. 144 // Adds parse error details to |errors_| string.
134 void ParseError(const char* details, ...); 145 void ParseError(const char* details, ...);
135 146
136 DISALLOW_COPY_AND_ASSIGN(UpdateResponse); 147 DISALLOW_COPY_AND_ASSIGN(UpdateResponse);
137 }; 148 };
138 149
139 } // namespace update_client 150 } // namespace update_client
140 151
141 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_RESPONSE_H_ 152 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_RESPONSE_H_
OLDNEW
« no previous file with comments | « components/update_client/update_checker.cc ('k') | components/update_client/update_response.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698