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 #include "google_apis/gcm/gcm_client_impl.h" | 5 #include "google_apis/gcm/gcm_client_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 url_request_context_getter_ = url_request_context_getter; | 178 url_request_context_getter_ = url_request_context_getter; |
179 const net::HttpNetworkSession::Params* network_session_params = | 179 const net::HttpNetworkSession::Params* network_session_params = |
180 url_request_context_getter_->GetURLRequestContext()-> | 180 url_request_context_getter_->GetURLRequestContext()-> |
181 GetNetworkSessionParams(); | 181 GetNetworkSessionParams(); |
182 DCHECK(network_session_params); | 182 DCHECK(network_session_params); |
183 network_session_ = new net::HttpNetworkSession(*network_session_params); | 183 network_session_ = new net::HttpNetworkSession(*network_session_params); |
184 | 184 |
185 chrome_build_proto_.CopyFrom(chrome_build_proto); | 185 chrome_build_proto_.CopyFrom(chrome_build_proto); |
186 account_ids_ = account_ids; | 186 account_ids_ = account_ids; |
187 | 187 |
188 gcm_store_.reset(new GCMStoreImpl(false, path, blocking_task_runner)); | 188 gcm_store_.reset(new GCMStoreImpl(path, blocking_task_runner)); |
189 | 189 |
190 delegate_ = delegate; | 190 delegate_ = delegate; |
191 | 191 |
192 state_ = INITIALIZED; | 192 state_ = INITIALIZED; |
193 } | 193 } |
194 | 194 |
195 void GCMClientImpl::Load() { | 195 void GCMClientImpl::Load() { |
196 DCHECK_EQ(INITIALIZED, state_); | 196 DCHECK_EQ(INITIALIZED, state_); |
197 | 197 |
198 // Once the loading is completed, the check-in will be initiated. | 198 // Once the loading is completed, the check-in will be initiated. |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 if (iter != send_error_details.additional_data.end()) { | 688 if (iter != send_error_details.additional_data.end()) { |
689 send_error_details.message_id = iter->second; | 689 send_error_details.message_id = iter->second; |
690 send_error_details.additional_data.erase(iter); | 690 send_error_details.additional_data.erase(iter); |
691 } | 691 } |
692 | 692 |
693 delegate_->OnMessageSendError(data_message_stanza.category(), | 693 delegate_->OnMessageSendError(data_message_stanza.category(), |
694 send_error_details); | 694 send_error_details); |
695 } | 695 } |
696 | 696 |
697 } // namespace gcm | 697 } // namespace gcm |
OLD | NEW |