Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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; | |
|
Sorin Jianu
2016/08/23 00:20:03
can we use static const char kCohort[] ?
waffles
2016/08/23 00:36:18
Done.
| |
| 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 Loading... | |
| 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_ |
| OLD | NEW |