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

Side by Side Diff: content/child/push_messaging/push_dispatcher.cc

Issue 1154283003: Change most uses of Pickle to base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « content/child/plugin_param_traits.cc ('k') | content/child/quota_message_filter.cc » ('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 "content/child/push_messaging/push_dispatcher.h" 5 #include "content/child/push_messaging/push_dispatcher.h"
6 6
7 #include "content/child/push_messaging/push_provider.h" 7 #include "content/child/push_messaging/push_provider.h"
8 #include "content/common/push_messaging_messages.h" 8 #include "content/common/push_messaging_messages.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 29 matching lines...) Expand all
40 void PushDispatcher::OnFilteredMessageReceived(const IPC::Message& msg) { 40 void PushDispatcher::OnFilteredMessageReceived(const IPC::Message& msg) {
41 bool handled = PushProvider::ThreadSpecificInstance( 41 bool handled = PushProvider::ThreadSpecificInstance(
42 thread_safe_sender(), this)->OnMessageReceived(msg); 42 thread_safe_sender(), this)->OnMessageReceived(msg);
43 DCHECK(handled); 43 DCHECK(handled);
44 } 44 }
45 45
46 bool PushDispatcher::GetWorkerThreadIdForMessage(const IPC::Message& msg, 46 bool PushDispatcher::GetWorkerThreadIdForMessage(const IPC::Message& msg,
47 int* ipc_thread_id) { 47 int* ipc_thread_id) {
48 int request_id = -1; 48 int request_id = -1;
49 49
50 const bool success = PickleIterator(msg).ReadInt(&request_id); 50 const bool success = base::PickleIterator(msg).ReadInt(&request_id);
51 DCHECK(success); 51 DCHECK(success);
52 52
53 base::AutoLock lock(request_id_map_lock_); 53 base::AutoLock lock(request_id_map_lock_);
54 auto it = request_id_map_.find(request_id); 54 auto it = request_id_map_.find(request_id);
55 if (it != request_id_map_.end()) { 55 if (it != request_id_map_.end()) {
56 *ipc_thread_id = it->second; 56 *ipc_thread_id = it->second;
57 request_id_map_.erase(it); 57 request_id_map_.erase(it);
58 return true; 58 return true;
59 } 59 }
60 return false; 60 return false;
61 } 61 }
62 62
63 } // namespace content 63 } // namespace content
OLDNEW
« no previous file with comments | « content/child/plugin_param_traits.cc ('k') | content/child/quota_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698