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

Side by Side Diff: chrome/browser/services/gcm/fake_gcm_client_factory.h

Issue 292813007: Remove dependency on content::BrowserThread from GCMDriver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
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 CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_CLIENT_FACTORY_H_ 5 #ifndef CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_CLIENT_FACTORY_H_
6 #define CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_CLIENT_FACTORY_H_ 6 #define CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_CLIENT_FACTORY_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/browser/services/gcm/fake_gcm_client.h" 10 #include "chrome/browser/services/gcm/fake_gcm_client.h"
11 #include "components/gcm_driver/gcm_client_factory.h" 11 #include "components/gcm_driver/gcm_client_factory.h"
12 12
13 namespace base {
14 class MessageLoopProxy;
15 }
16
13 namespace gcm { 17 namespace gcm {
14 18
15 class GCMClient; 19 class GCMClient;
16 20
17 class FakeGCMClientFactory : public GCMClientFactory { 21 class FakeGCMClientFactory : public GCMClientFactory {
18 public: 22 public:
19 explicit FakeGCMClientFactory(FakeGCMClient::StartMode gcm_client_start_mode); 23 FakeGCMClientFactory(FakeGCMClient::StartMode gcm_client_start_mode,
24 const scoped_refptr<base::MessageLoopProxy>& ui_thread,
25 const scoped_refptr<base::MessageLoopProxy>& io_thread);
20 virtual ~FakeGCMClientFactory(); 26 virtual ~FakeGCMClientFactory();
21 27
22 // GCMClientFactory: 28 // GCMClientFactory:
23 virtual scoped_ptr<GCMClient> BuildInstance() OVERRIDE; 29 virtual scoped_ptr<GCMClient> BuildInstance() OVERRIDE;
24 30
25 private: 31 private:
26 FakeGCMClient::StartMode gcm_client_start_mode_; 32 FakeGCMClient::StartMode gcm_client_start_mode_;
33 scoped_refptr<base::MessageLoopProxy> ui_thread_;
34 scoped_refptr<base::MessageLoopProxy> io_thread_;
27 35
28 DISALLOW_COPY_AND_ASSIGN(FakeGCMClientFactory); 36 DISALLOW_COPY_AND_ASSIGN(FakeGCMClientFactory);
29 }; 37 };
30 38
31 } // namespace gcm 39 } // namespace gcm
32 40
33 #endif // CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_CLIENT_FACTORY_H_ 41 #endif // CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_CLIENT_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698