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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, | 124 void RecordDecryptionFailure(const std::string& app_id, |
125 GCMEncryptionProvider::DecryptionFailure reason) | 125 GCMEncryptionProvider::DecryptionResult result) |
126 override; | 126 override; |
127 | 127 |
128 private: | 128 private: |
129 class IOWorker; | 129 class IOWorker; |
130 | 130 |
131 typedef base::Tuple<std::string, std::string, std::string> TokenTuple; | 131 typedef base::Tuple<std::string, std::string, std::string> TokenTuple; |
132 struct TokenTupleComparer { | 132 struct TokenTupleComparer { |
133 bool operator()(const TokenTuple& a, const TokenTuple& b) const; | 133 bool operator()(const TokenTuple& a, const TokenTuple& b) const; |
134 }; | 134 }; |
135 | 135 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 // Used to pass a weak pointer to the IO worker. | 239 // Used to pass a weak pointer to the IO worker. |
240 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; | 240 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; |
241 | 241 |
242 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); | 242 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); |
243 }; | 243 }; |
244 | 244 |
245 } // namespace gcm | 245 } // namespace gcm |
246 | 246 |
247 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 247 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
OLD | NEW |