| OLD | NEW |
| 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 COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_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 "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace user_prefs { | 22 namespace user_prefs { |
| 23 class PrefRegistrySyncable; | 23 class PrefRegistrySyncable; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace gcm { | 26 namespace gcm { |
| 27 | 27 |
| 28 class GCMChannelStatusRequest; | 28 class GCMChannelStatusRequest; |
| 29 class GCMDriver; | 29 class GCMDriver; |
| 30 | 30 |
| 31 namespace prefs { |
| 32 // The GCM channel's enabled state. |
| 33 extern const char kGCMChannelStatus[]; |
| 34 } // namepsace prefs |
| 35 |
| 31 // Syncing with the server for GCM channel status that controls if GCM | 36 // Syncing with the server for GCM channel status that controls if GCM |
| 32 // functionality should be enabled or disabled. | 37 // functionality should be enabled or disabled. |
| 33 class GCMChannelStatusSyncer { | 38 class GCMChannelStatusSyncer { |
| 34 public: | 39 public: |
| 35 static void RegisterPrefs(PrefRegistrySimple* registry); | 40 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 36 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 41 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 37 | 42 |
| 38 GCMChannelStatusSyncer( | 43 GCMChannelStatusSyncer( |
| 39 GCMDriver* driver, | 44 GCMDriver* driver, |
| 40 PrefService* prefs, | 45 PrefService* prefs, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 107 |
| 103 // Used to pass a weak pointer to a task. | 108 // Used to pass a weak pointer to a task. |
| 104 base::WeakPtrFactory<GCMChannelStatusSyncer> weak_ptr_factory_; | 109 base::WeakPtrFactory<GCMChannelStatusSyncer> weak_ptr_factory_; |
| 105 | 110 |
| 106 DISALLOW_COPY_AND_ASSIGN(GCMChannelStatusSyncer); | 111 DISALLOW_COPY_AND_ASSIGN(GCMChannelStatusSyncer); |
| 107 }; | 112 }; |
| 108 | 113 |
| 109 } // namespace gcm | 114 } // namespace gcm |
| 110 | 115 |
| 111 #endif // COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_ | 116 #endif // COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_ |
| OLD | NEW |