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

Side by Side Diff: chrome/browser/component_updater/ping_sender.h

Issue 18516010: Implemented completion pings for component updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_PING_SENDER_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_PING_SENDER_H_
7
8 #include <string>
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/component_updater/component_updater_service.h"
12 #include "net/url_request/url_fetcher_delegate.h"
13
14 struct CrxUpdateItem;
15
16 namespace component_updater {
17
18 // Sends a fire and forget ping. The instances of this class have no
19 // ownership and they self-delete upon completion.
20 class PingSender : public net::URLFetcherDelegate {
21 public:
22 explicit PingSender(ComponentUpdateService::Configurator* configurator);
23
24 void SendPing(const CrxUpdateItem* item);
25
26 private:
27 virtual ~PingSender();
28
29 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
30
31 std::string BuildPing(const CrxUpdateItem* item) const;
32 static std::string BuildPingEvent(const CrxUpdateItem* item);
33
34 scoped_ptr<net::URLFetcher> url_fetcher_;
35 ComponentUpdateService::Configurator* configurator_;
36
37 DISALLOW_COPY_AND_ASSIGN(PingSender);
38 };
39
40 } // namespace component_updater
41
42 #endif // CHROME_BROWSER_COMPONENT_UPDATER_PING_SENDER_H_
43
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698