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

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

Issue 2340113002: Inject the prodid for the extensions and component updaters. (Closed)
Patch Set: Remove "chromium" as a possible value in comment. Created 4 years, 3 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
« no previous file with comments | « components/update_client/configurator.h ('k') | components/update_client/test_configurator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/update_client/ping_manager.h" 5 #include "components/update_client/ping_manager.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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 156
157 const std::string app_element(base::StringPrintf( 157 const std::string app_element(base::StringPrintf(
158 app_element_format, 158 app_element_format,
159 item->id.c_str(), // "appid" 159 item->id.c_str(), // "appid"
160 item->previous_version.GetString().c_str(), // "version" 160 item->previous_version.GetString().c_str(), // "version"
161 item->next_version.GetString().c_str(), // "nextversion" 161 item->next_version.GetString().c_str(), // "nextversion"
162 ping_event.c_str(), // ping event 162 ping_event.c_str(), // ping event
163 BuildDownloadCompleteEventElements(item).c_str())); // download events 163 BuildDownloadCompleteEventElements(item).c_str())); // download events
164 164
165 return BuildProtocolRequest(config.GetBrowserVersion().GetString(), 165 return BuildProtocolRequest(
166 config.GetChannel(), config.GetLang(), 166 config.GetProdId(), config.GetBrowserVersion().GetString(),
167 config.GetOSLongName(), 167 config.GetChannel(), config.GetLang(), config.GetOSLongName(),
168 config.GetDownloadPreference(), app_element, ""); 168 config.GetDownloadPreference(), app_element, "");
169 } 169 }
170 170
171 // Sends a fire and forget ping. The instances of this class have no 171 // Sends a fire and forget ping. The instances of this class have no
172 // ownership and they self-delete upon completion. One instance of this class 172 // ownership and they self-delete upon completion. One instance of this class
173 // can send only one ping. 173 // can send only one ping.
174 class PingSender { 174 class PingSender {
175 public: 175 public:
176 explicit PingSender(const scoped_refptr<Configurator>& config); 176 explicit PingSender(const scoped_refptr<Configurator>& config);
177 ~PingSender(); 177 ~PingSender();
178 178
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 std::unique_ptr<PingSender> ping_sender(new PingSender(config_)); 234 std::unique_ptr<PingSender> ping_sender(new PingSender(config_));
235 if (!ping_sender->SendPing(item)) 235 if (!ping_sender->SendPing(item))
236 return false; 236 return false;
237 237
238 // The ping sender object self-deletes after sending the ping asynchrously. 238 // The ping sender object self-deletes after sending the ping asynchrously.
239 ping_sender.release(); 239 ping_sender.release();
240 return true; 240 return true;
241 } 241 }
242 242
243 } // namespace update_client 243 } // namespace update_client
OLDNEW
« no previous file with comments | « components/update_client/configurator.h ('k') | components/update_client/test_configurator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698