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

Side by Side Diff: content/child/notifications/notification_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
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/notifications/notification_dispatcher.h" 5 #include "content/child/notifications/notification_dispatcher.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "content/child/notifications/notification_manager.h" 9 #include "content/child/notifications/notification_manager.h"
10 10
(...skipping 23 matching lines...) Expand all
34 const IPC::Message& msg) { 34 const IPC::Message& msg) {
35 NotificationManager::ThreadSpecificInstance(thread_safe_sender(), 35 NotificationManager::ThreadSpecificInstance(thread_safe_sender(),
36 main_thread_task_runner(), 36 main_thread_task_runner(),
37 this)->OnMessageReceived(msg); 37 this)->OnMessageReceived(msg);
38 } 38 }
39 39
40 bool NotificationDispatcher::GetWorkerThreadIdForMessage( 40 bool NotificationDispatcher::GetWorkerThreadIdForMessage(
41 const IPC::Message& msg, 41 const IPC::Message& msg,
42 int* ipc_thread_id) { 42 int* ipc_thread_id) {
43 int notification_id = -1; 43 int notification_id = -1;
44 const bool success = PickleIterator(msg).ReadInt(&notification_id); 44 const bool success = base::PickleIterator(msg).ReadInt(&notification_id);
45 DCHECK(success); 45 DCHECK(success);
46 46
47 base::AutoLock lock(notification_id_map_lock_); 47 base::AutoLock lock(notification_id_map_lock_);
48 auto iterator = notification_id_map_.find(notification_id); 48 auto iterator = notification_id_map_.find(notification_id);
49 if (iterator != notification_id_map_.end()) { 49 if (iterator != notification_id_map_.end()) {
50 *ipc_thread_id = iterator->second; 50 *ipc_thread_id = iterator->second;
51 return true; 51 return true;
52 } 52 }
53 return false; 53 return false;
54 } 54 }
55 55
56 } // namespace content 56 } // namespace content
OLDNEW
« no previous file with comments | « content/child/navigator_connect/navigator_connect_dispatcher.cc ('k') | content/child/npapi/npruntime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698