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

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

Issue 317823007: Hook PushMessagingMessageFilter up to GCMDriver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO Created 6 years, 6 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_GCM_PROFILE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_
6 #define CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_ 6 #define CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/services/gcm/push_messaging_service_impl.h"
13 // TODO(jianli): include needed for obsolete methods that are going to be 14 // TODO(jianli): include needed for obsolete methods that are going to be
14 // removed soon. 15 // removed soon.
15 #include "components/gcm_driver/gcm_driver.h" 16 #include "components/gcm_driver/gcm_driver.h"
16 #include "components/keyed_service/core/keyed_service.h" 17 #include "components/keyed_service/core/keyed_service.h"
17 18
18 class Profile; 19 class Profile;
19 20
20 namespace user_prefs { 21 namespace user_prefs {
21 class PrefRegistrySyncable; 22 class PrefRegistrySyncable;
22 } 23 }
(...skipping 24 matching lines...) Expand all
47 const GCMDriver::RegisterCallback& callback); 48 const GCMDriver::RegisterCallback& callback);
48 49
49 // KeyedService: 50 // KeyedService:
50 virtual void Shutdown() OVERRIDE; 51 virtual void Shutdown() OVERRIDE;
51 52
52 // For testing purpose. 53 // For testing purpose.
53 void SetDriverForTesting(GCMDriver* driver); 54 void SetDriverForTesting(GCMDriver* driver);
54 55
55 GCMDriver* driver() const { return driver_.get(); } 56 GCMDriver* driver() const { return driver_.get(); }
56 57
58 content::PushMessagingService* push_messaging_service() {
jianli 2014/06/06 17:32:20 nit: add const modifier
johnme 2014/06/06 18:48:24 Done.
johnme 2014/06/09 19:04:45 Actually, I replied too soon - I had to remove the
59 return &push_messaging_service_;
60 }
61
57 protected: 62 protected:
58 // Used for constructing fake GCMProfileService for testing purpose. 63 // Used for constructing fake GCMProfileService for testing purpose.
59 GCMProfileService(); 64 GCMProfileService();
60 65
61 private: 66 private:
62 // The profile which owns this object. 67 // The profile which owns this object.
63 Profile* profile_; 68 Profile* profile_;
64 69
65 scoped_ptr<GCMDriver> driver_; 70 scoped_ptr<GCMDriver> driver_;
66 71
72 // Implementation of content::PushMessagingService using GCMProfileService.
73 PushMessagingServiceImpl push_messaging_service_;
74
67 DISALLOW_COPY_AND_ASSIGN(GCMProfileService); 75 DISALLOW_COPY_AND_ASSIGN(GCMProfileService);
68 }; 76 };
69 77
70 } // namespace gcm 78 } // namespace gcm
71 79
72 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_ 80 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698