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

Side by Side Diff: chrome/browser/sync/notifier/base/async_network_alive.h

Issue 1956001: Moved XMPP notifier library from chrome/browser/sync to chrome/common.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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) 2009 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_SYNC_NOTIFIER_BASE_ASYNC_NETWORK_ALIVE_H_
6 #define CHROME_BROWSER_SYNC_NOTIFIER_BASE_ASYNC_NETWORK_ALIVE_H_
7
8 #include "talk/base/signalthread.h"
9
10 namespace notifier {
11
12 // System specific info needed for changes.
13 class PlatformNetworkInfo;
14
15 class AsyncNetworkAlive : public talk_base::SignalThread {
16 public:
17 static AsyncNetworkAlive* Create();
18
19 virtual ~AsyncNetworkAlive() {}
20
21 bool alive() const {
22 return alive_;
23 }
24
25 bool error() const {
26 return error_;
27 }
28
29 void SetWaitForNetworkChange(PlatformNetworkInfo* previous_info) {
30 network_info_ = previous_info;
31 }
32
33 PlatformNetworkInfo* ReleaseInfo() {
34 PlatformNetworkInfo* info = network_info_;
35 network_info_ = NULL;
36 return info;
37 }
38
39 protected:
40 AsyncNetworkAlive() : network_info_(NULL), alive_(false), error_(false) {
41 }
42
43 PlatformNetworkInfo* network_info_;
44 bool alive_;
45 bool error_;
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(AsyncNetworkAlive);
49 };
50
51 } // namespace notifier
52
53 #endif // CHROME_BROWSER_SYNC_NOTIFIER_BASE_ASYNC_NETWORK_ALIVE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/notifier/base/async_dns_lookup.cc ('k') | chrome/browser/sync/notifier/base/fastalloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698