| 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 <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 13 | 14 |
| 14 namespace update_client { | 15 namespace update_client { |
| 15 | 16 |
| 16 // Parses responses for the update protocol version 3. | 17 // Parses responses for the update protocol version 3. |
| 17 // (https://github.com/google/omaha/blob/wiki/ServerProtocolV3.md) | 18 // (https://github.com/google/omaha/blob/wiki/ServerProtocolV3.md) |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 Manifest(const Manifest& other); | 83 Manifest(const Manifest& other); |
| 83 ~Manifest(); | 84 ~Manifest(); |
| 84 | 85 |
| 85 std::string version; | 86 std::string version; |
| 86 std::string browser_min_version; | 87 std::string browser_min_version; |
| 87 std::vector<Package> packages; | 88 std::vector<Package> packages; |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 Result(); | 91 Result(); |
| 91 Result(const Result& other); | 92 Result(const Result& other); |
| 93 UpdateResponse::Result& operator=(const Result& other); |
| 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 // When non-null, the server has instructed the client to set its cohort/ |
| 106 // cohorthint/cohortname to this string. |
| 107 std::unique_ptr<std::string> cohort; |
| 108 std::unique_ptr<std::string> cohort_hint; |
| 109 std::unique_ptr<std::string> cohort_name; |
| 102 }; | 110 }; |
| 103 | 111 |
| 104 static const int kNoDaystart = -1; | 112 static const int kNoDaystart = -1; |
| 105 struct Results { | 113 struct Results { |
| 106 Results(); | 114 Results(); |
| 107 Results(const Results& other); | 115 Results(const Results& other); |
| 108 ~Results(); | 116 ~Results(); |
| 109 | 117 |
| 110 // This will be >= 0, or kNoDaystart if the <daystart> tag was not present. | 118 // This will be >= 0, or kNoDaystart if the <daystart> tag was not present. |
| 111 int daystart_elapsed_seconds; | 119 int daystart_elapsed_seconds; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 132 | 140 |
| 133 // Adds parse error details to |errors_| string. | 141 // Adds parse error details to |errors_| string. |
| 134 void ParseError(const char* details, ...); | 142 void ParseError(const char* details, ...); |
| 135 | 143 |
| 136 DISALLOW_COPY_AND_ASSIGN(UpdateResponse); | 144 DISALLOW_COPY_AND_ASSIGN(UpdateResponse); |
| 137 }; | 145 }; |
| 138 | 146 |
| 139 } // namespace update_client | 147 } // namespace update_client |
| 140 | 148 |
| 141 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_RESPONSE_H_ | 149 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_RESPONSE_H_ |
| OLD | NEW |