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 <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 "<package fp=\"%s\"/>" | 118 "<package fp=\"%s\"/>" |
119 "</packages>", | 119 "</packages>", |
120 item->component.fingerprint.c_str()); | 120 item->component.fingerprint.c_str()); |
121 } | 121 } |
122 base::StringAppendF(&app, "</app>"); | 122 base::StringAppendF(&app, "</app>"); |
123 app_elements.append(app); | 123 app_elements.append(app); |
124 VLOG(1) << "Appending to update request: " << app; | 124 VLOG(1) << "Appending to update request: " << app; |
125 } | 125 } |
126 | 126 |
127 return BuildProtocolRequest( | 127 return BuildProtocolRequest( |
128 config.GetBrowserVersion().GetString(), config.GetChannel(), | 128 config.GetProdId(), config.GetBrowserVersion().GetString(), |
129 config.GetLang(), config.GetOSLongName(), config.GetDownloadPreference(), | 129 config.GetChannel(), config.GetLang(), config.GetOSLongName(), |
130 app_elements, additional_attributes); | 130 config.GetDownloadPreference(), app_elements, additional_attributes); |
131 } | 131 } |
132 | 132 |
133 class UpdateCheckerImpl : public UpdateChecker { | 133 class UpdateCheckerImpl : public UpdateChecker { |
134 public: | 134 public: |
135 UpdateCheckerImpl(const scoped_refptr<Configurator>& config, | 135 UpdateCheckerImpl(const scoped_refptr<Configurator>& config, |
136 PersistedData* metadata); | 136 PersistedData* metadata); |
137 ~UpdateCheckerImpl() override; | 137 ~UpdateCheckerImpl() override; |
138 | 138 |
139 // Overrides for UpdateChecker. | 139 // Overrides for UpdateChecker. |
140 bool CheckForUpdates( | 140 bool CheckForUpdates( |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 } // namespace | 241 } // namespace |
242 | 242 |
243 std::unique_ptr<UpdateChecker> UpdateChecker::Create( | 243 std::unique_ptr<UpdateChecker> UpdateChecker::Create( |
244 const scoped_refptr<Configurator>& config, | 244 const scoped_refptr<Configurator>& config, |
245 PersistedData* persistent) { | 245 PersistedData* persistent) { |
246 return std::unique_ptr<UpdateChecker>( | 246 return std::unique_ptr<UpdateChecker>( |
247 new UpdateCheckerImpl(config, persistent)); | 247 new UpdateCheckerImpl(config, persistent)); |
248 } | 248 } |
249 | 249 |
250 } // namespace update_client | 250 } // namespace update_client |
OLD | NEW |