| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 5 #ifndef GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
| 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // Begins initialization of the GCM Client. | 135 // Begins initialization of the GCM Client. |
| 136 // |chrome_build_proto|: chrome info, i.e., version, channel and etc. | 136 // |chrome_build_proto|: chrome info, i.e., version, channel and etc. |
| 137 // |store_path|: path to the GCM store. | 137 // |store_path|: path to the GCM store. |
| 138 // |blocking_task_runner|: for running blocking file tasks. | 138 // |blocking_task_runner|: for running blocking file tasks. |
| 139 // |url_request_context_getter|: for url requests. | 139 // |url_request_context_getter|: for url requests. |
| 140 // |delegate|: the delegate whose methods will be called asynchronously in | 140 // |delegate|: the delegate whose methods will be called asynchronously in |
| 141 // response to events and messages. | 141 // response to events and messages. |
| 142 virtual void Initialize( | 142 virtual void Initialize( |
| 143 const checkin_proto::ChromeBuildProto& chrome_build_proto, | 143 const checkin_proto::ChromeBuildProto& chrome_build_proto, |
| 144 const base::FilePath& store_path, | 144 const base::FilePath& store_path, |
| 145 const std::vector<std::string>& account_ids, |
| 145 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, | 146 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, |
| 146 const scoped_refptr<net::URLRequestContextGetter>& | 147 const scoped_refptr<net::URLRequestContextGetter>& |
| 147 url_request_context_getter, | 148 url_request_context_getter, |
| 148 Delegate* delegate) = 0; | 149 Delegate* delegate) = 0; |
| 149 | 150 |
| 150 // Checks out of the GCM service. This will erase all the cached and persisted | 151 // Checks out of the GCM service. This will erase all the cached and persisted |
| 151 // data. | 152 // data. |
| 152 virtual void CheckOut() = 0; | 153 virtual void CheckOut() = 0; |
| 153 | 154 |
| 154 // Registers the application for GCM. Delegate::OnRegisterFinished will be | 155 // Registers the application for GCM. Delegate::OnRegisterFinished will be |
| (...skipping 22 matching lines...) Expand all Loading... |
| 177 const std::string& receiver_id, | 178 const std::string& receiver_id, |
| 178 const OutgoingMessage& message) = 0; | 179 const OutgoingMessage& message) = 0; |
| 179 | 180 |
| 180 // Returns true if GCM becomes ready. | 181 // Returns true if GCM becomes ready. |
| 181 virtual bool IsReady() const = 0; | 182 virtual bool IsReady() const = 0; |
| 182 }; | 183 }; |
| 183 | 184 |
| 184 } // namespace gcm | 185 } // namespace gcm |
| 185 | 186 |
| 186 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ | 187 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ |
| OLD | NEW |