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

Side by Side Diff: jingle/notifier/base/fake_base_task.h

Issue 5712005: Merge 68891 - [Sync] Fixed sync crash regression in ServerNotifierThread (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src
Patch Set: Created 10 years 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | jingle/notifier/base/fake_base_task.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 stand-in for stuff that expects a weak pointer to a BaseTask for
6 // handles all the startup/shutdown details and hookups. 6 // testing.
7 7
8 #ifndef JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_ 8 #ifndef JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_
9 #define JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_ 9 #define JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_
10 #pragma once 10 #pragma once
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/weak_ptr.h" 13 #include "base/weak_ptr.h"
14 #include "jingle/notifier/base/task_pump.h" 14 #include "jingle/notifier/base/task_pump.h"
15 15
16 namespace talk_base { 16 namespace talk_base {
17 class Task; 17 class Task;
18 } // namespace talk_base 18 } // namespace talk_base
19 19
20 namespace notifier { 20 namespace notifier {
21 21
22 // This class expects a message loop to exist on the current thread.
23 class FakeBaseTask { 22 class FakeBaseTask {
24 public: 23 public:
25 FakeBaseTask(); 24 FakeBaseTask();
26 25
27 base::WeakPtr<talk_base::Task> AsWeakPtr(); 26 base::WeakPtr<talk_base::Task> AsWeakPtr();
28 27
29 private: 28 private:
30 notifier::TaskPump task_pump_; 29 notifier::TaskPump task_pump_;
31 base::WeakPtr<talk_base::Task> base_task_; 30 base::WeakPtr<talk_base::Task> base_task_;
32 31
33 DISALLOW_COPY_AND_ASSIGN(FakeBaseTask); 32 DISALLOW_COPY_AND_ASSIGN(FakeBaseTask);
34 }; 33 };
35 34
36 } // namespace notifier 35 } // namespace notifier
37 36
38 #endif // JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_ 37 #endif // JINGLE_NOTIFIER_FAKE_XMPP_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | jingle/notifier/base/fake_base_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698