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

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

Issue 334783002: Componentize component_updater: Move some paths/constants to component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge origin/master Created 6 years, 6 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_PING_MANAGER_H_ 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_PING_MANAGER_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_PING_MANAGER_H_ 6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_PING_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
11 namespace net { 11 namespace net {
12 class URLRequestContextGetter; 12 class URLRequestContextGetter;
13 } // namespace net 13 } // namespace net
14 14
15 namespace component_updater { 15 namespace component_updater {
16 16
17 struct CrxUpdateItem; 17 struct CrxUpdateItem;
18 18
19 // Provides an event sink for completion events from ComponentUpdateService 19 // Provides an event sink for completion events from ComponentUpdateService
20 // and sends fire-and-forget pings when handling these events. 20 // and sends fire-and-forget pings when handling these events.
21 class PingManager { 21 class PingManager {
22 public: 22 public:
23 PingManager(const GURL& ping_url, 23 PingManager(const std::string& application_version,
24 const std::string& platform_name,
25 const GURL& ping_url,
24 net::URLRequestContextGetter* url_request_context_getter); 26 net::URLRequestContextGetter* url_request_context_getter);
25 ~PingManager(); 27 ~PingManager();
26 28
27 void OnUpdateComplete(const CrxUpdateItem* item); 29 void OnUpdateComplete(const CrxUpdateItem* item);
28 30
29 private: 31 private:
32 const std::string application_version_;
33 const std::string platform_name_;
30 const GURL ping_url_; 34 const GURL ping_url_;
31 35
32 // This member is not owned by this class. 36 // This member is not owned by this class.
33 net::URLRequestContextGetter* url_request_context_getter_; 37 net::URLRequestContextGetter* url_request_context_getter_;
34 38
35 DISALLOW_COPY_AND_ASSIGN(PingManager); 39 DISALLOW_COPY_AND_ASSIGN(PingManager);
36 }; 40 };
37 41
38 } // namespace component_updater 42 } // namespace component_updater
39 43
40 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_PING_MANAGER_H_ 44 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_PING_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698