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 #include "components/update_client/update_checker.h" | 5 #include "components/update_client/update_checker.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 "<packages>" | 62 "<packages>" |
63 "<package fp=\"%s\"/>" | 63 "<package fp=\"%s\"/>" |
64 "</packages>", | 64 "</packages>", |
65 item->component.fingerprint.c_str()); | 65 item->component.fingerprint.c_str()); |
66 } | 66 } |
67 base::StringAppendF(&app, "</app>"); | 67 base::StringAppendF(&app, "</app>"); |
68 app_elements.append(app); | 68 app_elements.append(app); |
69 VLOG(1) << "Appending to update request: " << app; | 69 VLOG(1) << "Appending to update request: " << app; |
70 } | 70 } |
71 | 71 |
72 return BuildProtocolRequest(config.GetBrowserVersion().GetString(), | 72 return BuildProtocolRequest( |
73 config.GetChannel(), config.GetLang(), | 73 config.GetBrowserVersion().GetString(), config.GetChannel(), |
74 config.GetOSLongName(), app_elements, | 74 config.GetLang(), config.GetOSLongName(), config.GetDownloadPreference(), |
75 additional_attributes); | 75 app_elements, additional_attributes); |
76 } | 76 } |
77 | 77 |
78 class UpdateCheckerImpl : public UpdateChecker { | 78 class UpdateCheckerImpl : public UpdateChecker { |
79 public: | 79 public: |
80 explicit UpdateCheckerImpl(const scoped_refptr<Configurator>& config); | 80 explicit UpdateCheckerImpl(const scoped_refptr<Configurator>& config); |
81 ~UpdateCheckerImpl() override; | 81 ~UpdateCheckerImpl() override; |
82 | 82 |
83 // Overrides for UpdateChecker. | 83 // Overrides for UpdateChecker. |
84 bool CheckForUpdates( | 84 bool CheckForUpdates( |
85 const std::vector<CrxUpdateItem*>& items_to_check, | 85 const std::vector<CrxUpdateItem*>& items_to_check, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 166 } |
167 | 167 |
168 } // namespace | 168 } // namespace |
169 | 169 |
170 scoped_ptr<UpdateChecker> UpdateChecker::Create( | 170 scoped_ptr<UpdateChecker> UpdateChecker::Create( |
171 const scoped_refptr<Configurator>& config) { | 171 const scoped_refptr<Configurator>& config) { |
172 return scoped_ptr<UpdateChecker>(new UpdateCheckerImpl(config)); | 172 return scoped_ptr<UpdateChecker>(new UpdateCheckerImpl(config)); |
173 } | 173 } |
174 | 174 |
175 } // namespace update_client | 175 } // namespace update_client |
OLD | NEW |