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: components/update_client/ping_manager.h

Issue 2835803002: Refactor the UpdateEngine and its actions in the component updater. (Closed)
Patch Set: feedback up to #6 Created 3 years, 8 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/crx_update_item.h ('k') | components/update_client/ping_manager.cc » ('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 #ifndef COMPONENTS_UPDATE_CLIENT_PING_MANAGER_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_PING_MANAGER_H_
6 #define COMPONENTS_UPDATE_CLIENT_PING_MANAGER_H_ 6 #define COMPONENTS_UPDATE_CLIENT_PING_MANAGER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/threading/thread_checker.h"
10 11
11 namespace update_client { 12 namespace update_client {
12 13
13 class Configurator; 14 class Configurator;
14 struct CrxUpdateItem; 15 class Component;
15 16
16 // Sends fire-and-forget pings. 17 // Sends fire-and-forget pings.
17 class PingManager { 18 class PingManager {
18 public: 19 public:
19 explicit PingManager(const scoped_refptr<Configurator>& config); 20 explicit PingManager(const scoped_refptr<Configurator>& config);
20 virtual ~PingManager(); 21 virtual ~PingManager();
21 22
22 // Sends a fire and forget ping for the |item|. Returns true if the 23 // Sends a fire and forget ping for the |item|. Returns true if the
23 // ping is queued up and may be sent in the future, or false, if an error 24 // ping is queued up and may be sent in the future, or false, if an error
24 // occurs right away. The ping itself is not persisted and it will be 25 // occurs right away. The ping itself is not persisted and it will be
25 // discarded if it can't be sent for any reason. 26 // discarded if it can't be sent for any reason.
26 virtual bool SendPing(const CrxUpdateItem* item); 27 virtual bool SendPing(const Component& component);
27 28
28 private: 29 private:
30 base::ThreadChecker thread_checker_;
31
29 const scoped_refptr<Configurator> config_; 32 const scoped_refptr<Configurator> config_;
30 33
31 DISALLOW_COPY_AND_ASSIGN(PingManager); 34 DISALLOW_COPY_AND_ASSIGN(PingManager);
32 }; 35 };
33 36
34 } // namespace update_client 37 } // namespace update_client
35 38
36 #endif // COMPONENTS_UPDATE_CLIENT_PING_MANAGER_H_ 39 #endif // COMPONENTS_UPDATE_CLIENT_PING_MANAGER_H_
OLDNEW
« no previous file with comments | « components/update_client/crx_update_item.h ('k') | components/update_client/ping_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698