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

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: Remove channel from product_category_for_subtypes, and address nits 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
« no previous file with comments | « components/gcm_driver/fake_gcm_client.h ('k') | components/gcm_driver/gcm_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 product_category_for_subtypes_ =
84 chrome_build_info.product_category_for_subtypes;
83 delegate_ = delegate; 85 delegate_ = delegate;
84 } 86 }
85 87
86 void FakeGCMClient::Start(StartMode start_mode) { 88 void FakeGCMClient::Start(StartMode start_mode) {
87 DCHECK(io_thread_->RunsTasksOnCurrentThread()); 89 DCHECK(io_thread_->RunsTasksOnCurrentThread());
88 90
89 if (started_) 91 if (started_)
90 return; 92 return;
91 93
92 if (start_mode == IMMEDIATE_START) 94 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); 320 delegate_->OnMessageSendError(app_id, send_error_details);
319 } 321 }
320 322
321 void FakeGCMClient::SendAcknowledgement(const std::string& app_id, 323 void FakeGCMClient::SendAcknowledgement(const std::string& app_id,
322 const std::string& message_id) { 324 const std::string& message_id) {
323 if (delegate_) 325 if (delegate_)
324 delegate_->OnSendAcknowledged(app_id, message_id); 326 delegate_->OnSendAcknowledged(app_id, message_id);
325 } 327 }
326 328
327 } // namespace gcm 329 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/fake_gcm_client.h ('k') | components/gcm_driver/gcm_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698