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

Side by Side Diff: chrome/browser/sync/notifier/chrome_invalidation_client.h

Issue 2836032: Use InvalidationClient::Create() instead of creating an Impl directly. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « no previous file | chrome/browser/sync/notifier/chrome_invalidation_client.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // A simple wrapper around invalidation::InvalidationClient that 5 // A simple wrapper around invalidation::InvalidationClient that
6 // handles all the startup/shutdown details and hookups. 6 // handles all the startup/shutdown details and hookups.
7 7
8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ 8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_
9 #define CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ 9 #define CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_
10 10
(...skipping 17 matching lines...) Expand all
28 // properly notify invalidation_client_. 28 // properly notify invalidation_client_.
29 29
30 class ChromeInvalidationClient { 30 class ChromeInvalidationClient {
31 public: 31 public:
32 ChromeInvalidationClient(); 32 ChromeInvalidationClient();
33 33
34 ~ChromeInvalidationClient(); 34 ~ChromeInvalidationClient();
35 35
36 // Does not take ownership of |listener| nor |xmpp_client|. 36 // Does not take ownership of |listener| nor |xmpp_client|.
37 void Start( 37 void Start(
38 const std::string& app_name, 38 const std::string& client_id,
39 invalidation::InvalidationListener* listener, 39 invalidation::InvalidationListener* listener,
40 buzz::XmppClient* xmpp_client); 40 buzz::XmppClient* xmpp_client);
41 41
42 void Stop(); 42 void Stop();
43 43
44 // The following functions must only be called between calls to 44 // The following functions must only be called between calls to
45 // Start() and Stop(). See invalidation-client.h for documentation. 45 // Start() and Stop(). See invalidation-client.h for documentation.
46 46
47 void Register(const invalidation::ObjectId& oid, 47 void Register(const invalidation::ObjectId& oid,
48 invalidation::RegistrationCallback* callback); 48 invalidation::RegistrationCallback* callback);
49 49
50 void Unregister(const invalidation::ObjectId& oid, 50 void Unregister(const invalidation::ObjectId& oid,
51 invalidation::RegistrationCallback* callback); 51 invalidation::RegistrationCallback* callback);
52 52
53 private: 53 private:
54 NonThreadSafe non_thread_safe_; 54 NonThreadSafe non_thread_safe_;
55 ChromeSystemResources chrome_system_resources_; 55 ChromeSystemResources chrome_system_resources_;
56 scoped_ptr<invalidation::InvalidationClient> invalidation_client_; 56 scoped_ptr<invalidation::InvalidationClient> invalidation_client_;
57 scoped_ptr<CacheInvalidationPacketHandler> 57 scoped_ptr<CacheInvalidationPacketHandler>
58 cache_invalidation_packet_handler_; 58 cache_invalidation_packet_handler_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); 60 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient);
61 }; 61 };
62 62
63 } // namespace sync_notifier 63 } // namespace sync_notifier
64 64
65 #endif // CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ 65 #endif // CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/notifier/chrome_invalidation_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698