| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 protected: | 115 protected: |
| 116 // GCMDriver implementation: | 116 // GCMDriver implementation: |
| 117 GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override; | 117 GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override; |
| 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 OutgoingMessage& message) override; | 123 const OutgoingMessage& message) override; |
| 124 void RecordDecryptionFailure(const std::string& app_id, |
| 125 GCMEncryptionProvider::DecryptionFailure reason) |
| 126 override; |
| 124 | 127 |
| 125 private: | 128 private: |
| 126 class IOWorker; | 129 class IOWorker; |
| 127 | 130 |
| 128 typedef base::Tuple<std::string, std::string, std::string> TokenTuple; | 131 typedef base::Tuple<std::string, std::string, std::string> TokenTuple; |
| 129 struct TokenTupleComparer { | 132 struct TokenTupleComparer { |
| 130 bool operator()(const TokenTuple& a, const TokenTuple& b) const; | 133 bool operator()(const TokenTuple& a, const TokenTuple& b) const; |
| 131 }; | 134 }; |
| 132 | 135 |
| 133 // Stops the GCM service. It can be restarted by calling EnsureStarted again. | 136 // Stops the GCM service. It can be restarted by calling EnsureStarted again. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 238 |
| 236 // Used to pass a weak pointer to the IO worker. | 239 // Used to pass a weak pointer to the IO worker. |
| 237 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; | 240 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; |
| 238 | 241 |
| 239 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); | 242 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); |
| 240 }; | 243 }; |
| 241 | 244 |
| 242 } // namespace gcm | 245 } // namespace gcm |
| 243 | 246 |
| 244 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 247 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| OLD | NEW |