| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 void RegisterImpl(const std::string& app_id, | 118 void RegisterImpl(const std::string& app_id, |
| 119 const std::vector<std::string>& sender_ids) override; | 119 const std::vector<std::string>& sender_ids) override; |
| 120 void UnregisterImpl(const std::string& app_id) override; | 120 void UnregisterImpl(const std::string& app_id) override; |
| 121 void SendImpl(const std::string& app_id, | 121 void SendImpl(const std::string& app_id, |
| 122 const std::string& receiver_id, | 122 const std::string& receiver_id, |
| 123 const GCMClient::OutgoingMessage& message) override; | 123 const GCMClient::OutgoingMessage& message) override; |
| 124 | 124 |
| 125 private: | 125 private: |
| 126 class IOWorker; | 126 class IOWorker; |
| 127 | 127 |
| 128 typedef Tuple<std::string, std::string, std::string> TokenTuple; | 128 typedef base::Tuple<std::string, std::string, std::string> TokenTuple; |
| 129 struct TokenTupleComparer { | 129 struct TokenTupleComparer { |
| 130 bool operator()(const TokenTuple& a, const TokenTuple& b) const; | 130 bool operator()(const TokenTuple& a, const TokenTuple& b) const; |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 // Stops the GCM service. It can be restarted by calling EnsureStarted again. | 133 // Stops the GCM service. It can be restarted by calling EnsureStarted again. |
| 134 void Stop(); | 134 void Stop(); |
| 135 | 135 |
| 136 // Remove cached data when GCM service is stopped. | 136 // Remove cached data when GCM service is stopped. |
| 137 void RemoveCachedData(); | 137 void RemoveCachedData(); |
| 138 | 138 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |