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

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

Issue 808773005: Move most of the component updater artifacts to update_client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
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 #include "components/component_updater/update_response.h" 5 #include "components/update_client/update_response.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "base/version.h" 14 #include "base/version.h"
15 #include "libxml/tree.h" 15 #include "libxml/tree.h"
16 #include "third_party/libxml/chromium/libxml_utils.h" 16 #include "third_party/libxml/chromium/libxml_utils.h"
17 17
18 namespace component_updater { 18 namespace update_client {
19 19
20 static const char* kExpectedResponseProtocol = "3.0"; 20 static const char* kExpectedResponseProtocol = "3.0";
21 21
22 UpdateResponse::UpdateResponse() {} 22 UpdateResponse::UpdateResponse() {
23 UpdateResponse::~UpdateResponse() {} 23 }
24 UpdateResponse::~UpdateResponse() {
25 }
24 26
25 UpdateResponse::Results::Results() : daystart_elapsed_seconds(kNoDaystart) {} 27 UpdateResponse::Results::Results() : daystart_elapsed_seconds(kNoDaystart) {
26 UpdateResponse::Results::~Results() {} 28 }
29 UpdateResponse::Results::~Results() {
30 }
27 31
28 UpdateResponse::Result::Result() {} 32 UpdateResponse::Result::Result() {
33 }
29 34
30 UpdateResponse::Result::~Result() {} 35 UpdateResponse::Result::~Result() {
36 }
31 37
32 UpdateResponse::Result::Manifest::Manifest() {} 38 UpdateResponse::Result::Manifest::Manifest() {
33 UpdateResponse::Result::Manifest::~Manifest() {} 39 }
40 UpdateResponse::Result::Manifest::~Manifest() {
41 }
34 42
35 UpdateResponse::Result::Manifest::Package::Package() : size(0), sizediff(0) {} 43 UpdateResponse::Result::Manifest::Package::Package() : size(0), sizediff(0) {
36 UpdateResponse::Result::Manifest::Package::~Package() {} 44 }
45 UpdateResponse::Result::Manifest::Package::~Package() {
46 }
37 47
38 void UpdateResponse::ParseError(const char* details, ...) { 48 void UpdateResponse::ParseError(const char* details, ...) {
39 va_list args; 49 va_list args;
40 va_start(args, details); 50 va_start(args, details);
41 51
42 if (!errors_.empty()) { 52 if (!errors_.empty()) {
43 errors_ += "\r\n"; 53 errors_ += "\r\n";
44 } 54 }
45 55
46 base::StringAppendV(&errors_, details, args); 56 base::StringAppendV(&errors_, details, args);
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 if (ParseAppTag(apps[i], &result, &error)) { 339 if (ParseAppTag(apps[i], &result, &error)) {
330 results_.list.push_back(result); 340 results_.list.push_back(result);
331 } else { 341 } else {
332 ParseError("%s", error.c_str()); 342 ParseError("%s", error.c_str());
333 } 343 }
334 } 344 }
335 345
336 return true; 346 return true;
337 } 347 }
338 348
339 } // namespace component_updater 349 } // namespace update_client
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698