Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: components/gcm_driver/fake_gcm_client.cc

Issue 2111973002: Add support for GCM subtypes to desktop Instance ID implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid9push
Patch Set: Address review comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "components/gcm_driver/fake_gcm_client.h" 5 #include "components/gcm_driver/fake_gcm_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 void FakeGCMClient::Initialize( 75 void FakeGCMClient::Initialize(
76 const ChromeBuildInfo& chrome_build_info, 76 const ChromeBuildInfo& chrome_build_info,
77 const base::FilePath& store_path, 77 const base::FilePath& store_path,
78 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, 78 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner,
79 const scoped_refptr<net::URLRequestContextGetter>& 79 const scoped_refptr<net::URLRequestContextGetter>&
80 url_request_context_getter, 80 url_request_context_getter,
81 std::unique_ptr<Encryptor> encryptor, 81 std::unique_ptr<Encryptor> encryptor,
82 Delegate* delegate) { 82 Delegate* delegate) {
83 category_for_subtypes_ = chrome_build_info.category_for_subtypes;
83 delegate_ = delegate; 84 delegate_ = delegate;
84 } 85 }
85 86
86 void FakeGCMClient::Start(StartMode start_mode) { 87 void FakeGCMClient::Start(StartMode start_mode) {
87 DCHECK(io_thread_->RunsTasksOnCurrentThread()); 88 DCHECK(io_thread_->RunsTasksOnCurrentThread());
88 89
89 if (started_) 90 if (started_)
90 return; 91 return;
91 92
92 if (start_mode == IMMEDIATE_START) 93 if (start_mode == IMMEDIATE_START)
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 delegate_->OnMessageSendError(app_id, send_error_details); 319 delegate_->OnMessageSendError(app_id, send_error_details);
319 } 320 }
320 321
321 void FakeGCMClient::SendAcknowledgement(const std::string& app_id, 322 void FakeGCMClient::SendAcknowledgement(const std::string& app_id,
322 const std::string& message_id) { 323 const std::string& message_id) {
323 if (delegate_) 324 if (delegate_)
324 delegate_->OnSendAcknowledged(app_id, message_id); 325 delegate_->OnSendAcknowledged(app_id, message_id);
325 } 326 }
326 327
327 } // namespace gcm 328 } // namespace gcm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698