| OLD | NEW |
| 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, const GURL& ping_url, |
| 24 net::URLRequestContextGetter* url_request_context_getter); | 25 net::URLRequestContextGetter* url_request_context_getter); |
| 25 ~PingManager(); | 26 ~PingManager(); |
| 26 | 27 |
| 27 void OnUpdateComplete(const CrxUpdateItem* item); | 28 void OnUpdateComplete(const CrxUpdateItem* item); |
| 28 | 29 |
| 29 private: | 30 private: |
| 31 const std::string application_version_; |
| 32 const std::string platform_name_; |
| 30 const GURL ping_url_; | 33 const GURL ping_url_; |
| 31 | 34 |
| 32 // This member is not owned by this class. | 35 // This member is not owned by this class. |
| 33 net::URLRequestContextGetter* url_request_context_getter_; | 36 net::URLRequestContextGetter* url_request_context_getter_; |
| 34 | 37 |
| 35 DISALLOW_COPY_AND_ASSIGN(PingManager); | 38 DISALLOW_COPY_AND_ASSIGN(PingManager); |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 } // namespace component_updater | 41 } // namespace component_updater |
| 39 | 42 |
| 40 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_PING_MANAGER_H_ | 43 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_PING_MANAGER_H_ |
| OLD | NEW |