| 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_DRIVER_DESKTOP_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 187 |
| 188 // Flag to indicate if GCM is enabled. | 188 // Flag to indicate if GCM is enabled. |
| 189 bool gcm_enabled_; | 189 bool gcm_enabled_; |
| 190 | 190 |
| 191 // Flag to indicate the last known state of the GCM client. Because this | 191 // Flag to indicate the last known state of the GCM client. Because this |
| 192 // flag lives on the UI thread, while the GCM client lives on the IO thread, | 192 // flag lives on the UI thread, while the GCM client lives on the IO thread, |
| 193 // it may be out of date while connection changes are happening. | 193 // it may be out of date while connection changes are happening. |
| 194 bool connected_; | 194 bool connected_; |
| 195 | 195 |
| 196 // List of observers to notify when connection state changes. | 196 // List of observers to notify when connection state changes. |
| 197 ObserverList<GCMConnectionObserver, false> connection_observer_list_; | 197 base::ObserverList<GCMConnectionObserver, false> connection_observer_list_; |
| 198 | 198 |
| 199 // Account mapper. Only works when user is signed in. | 199 // Account mapper. Only works when user is signed in. |
| 200 scoped_ptr<GCMAccountMapper> account_mapper_; | 200 scoped_ptr<GCMAccountMapper> account_mapper_; |
| 201 | 201 |
| 202 // Time of last token fetching. | 202 // Time of last token fetching. |
| 203 base::Time last_token_fetch_time_; | 203 base::Time last_token_fetch_time_; |
| 204 | 204 |
| 205 scoped_refptr<base::SequencedTaskRunner> ui_thread_; | 205 scoped_refptr<base::SequencedTaskRunner> ui_thread_; |
| 206 scoped_refptr<base::SequencedTaskRunner> io_thread_; | 206 scoped_refptr<base::SequencedTaskRunner> io_thread_; |
| 207 | 207 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 230 | 230 |
| 231 // Used to pass a weak pointer to the IO worker. | 231 // Used to pass a weak pointer to the IO worker. |
| 232 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; | 232 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; |
| 233 | 233 |
| 234 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); | 234 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); |
| 235 }; | 235 }; |
| 236 | 236 |
| 237 } // namespace gcm | 237 } // namespace gcm |
| 238 | 238 |
| 239 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 239 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| OLD | NEW |