| 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> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 15 | 15 |
| 16 namespace update_client { | 16 namespace update_client { |
| 17 | 17 |
| 18 // The protocol versions so far are: |
| 19 // * Version 3.1: it changes how the run actions are serialized. |
| 20 // * Version 3.0: it is the version implemented by the desktop updaters. |
| 21 constexpr char kProtocolVersion[] = "3.1"; |
| 22 |
| 18 // Parses responses for the update protocol version 3. | 23 // Parses responses for the update protocol version 3. |
| 19 // (https://github.com/google/omaha/blob/wiki/ServerProtocolV3.md) | 24 // (https://github.com/google/omaha/blob/wiki/ServerProtocolV3.md) |
| 20 // | 25 // |
| 21 // An update response looks like this: | 26 // An update response looks like this: |
| 22 // | 27 // |
| 23 // <?xml version="1.0" encoding="UTF-8"?> | 28 // <?xml version="1.0" encoding="UTF-8"?> |
| 24 // <response protocol="3.0" server="prod"> | 29 // <response protocol="3.0" server="prod"> |
| 25 // <daystart elapsed_seconds="56508"/> | 30 // <daystart elapsed_seconds="56508"/> |
| 26 // <app appid="{430FD4D0-B729-4F61-AA34-91526481799D}" status="ok"> | 31 // <app appid="{430FD4D0-B729-4F61-AA34-91526481799D}" status="ok"> |
| 27 // <updatecheck status="noupdate"/> | 32 // <updatecheck status="noupdate"/> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 157 |
| 153 // Adds parse error details to |errors_| string. | 158 // Adds parse error details to |errors_| string. |
| 154 void ParseError(const char* details, ...); | 159 void ParseError(const char* details, ...); |
| 155 | 160 |
| 156 DISALLOW_COPY_AND_ASSIGN(UpdateResponse); | 161 DISALLOW_COPY_AND_ASSIGN(UpdateResponse); |
| 157 }; | 162 }; |
| 158 | 163 |
| 159 } // namespace update_client | 164 } // namespace update_client |
| 160 | 165 |
| 161 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_RESPONSE_H_ | 166 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_RESPONSE_H_ |
| OLD | NEW |