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

Side by Side Diff: content/browser/android/java/gin_java_bridge_dispatcher_host.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/browser/android/java/gin_java_bridge_dispatcher_host.h" 5 #include "content/browser/android/java/gin_java_bridge_dispatcher_host.h"
6 6
7 #include "base/android/java_handler_thread.h" 7 #include "base/android/java_handler_thread.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // WebView instance. We should redesign to have a filter per RPH. 318 // WebView instance. We should redesign to have a filter per RPH.
319 // Check, if the object ID in the message is known to this host. If not, 319 // Check, if the object ID in the message is known to this host. If not,
320 // this is a message for some other host. As all our IPC messages from the 320 // this is a message for some other host. As all our IPC messages from the
321 // renderer start with object ID, we just fetch it directly from the 321 // renderer start with object ID, we just fetch it directly from the
322 // message, considering sync and async messages separately. 322 // message, considering sync and async messages separately.
323 switch (message.type()) { 323 switch (message.type()) {
324 case GinJavaBridgeHostMsg_GetMethods::ID: 324 case GinJavaBridgeHostMsg_GetMethods::ID:
325 case GinJavaBridgeHostMsg_HasMethod::ID: 325 case GinJavaBridgeHostMsg_HasMethod::ID:
326 case GinJavaBridgeHostMsg_InvokeMethod::ID: { 326 case GinJavaBridgeHostMsg_InvokeMethod::ID: {
327 DCHECK(message.is_sync()); 327 DCHECK(message.is_sync());
328 PickleIterator message_reader = 328 base::PickleIterator message_reader =
329 IPC::SyncMessage::GetDataIterator(&message); 329 IPC::SyncMessage::GetDataIterator(&message);
330 if (!IPC::ReadParam(&message, &message_reader, &object_id)) 330 if (!IPC::ReadParam(&message, &message_reader, &object_id))
331 return NULL; 331 return NULL;
332 break; 332 break;
333 } 333 }
334 case GinJavaBridgeHostMsg_ObjectWrapperDeleted::ID: { 334 case GinJavaBridgeHostMsg_ObjectWrapperDeleted::ID: {
335 DCHECK(!message.is_sync()); 335 DCHECK(!message.is_sync());
336 PickleIterator message_reader(message); 336 base::PickleIterator message_reader(message);
337 if (!IPC::ReadParam(&message, &message_reader, &object_id)) 337 if (!IPC::ReadParam(&message, &message_reader, &object_id))
338 return NULL; 338 return NULL;
339 break; 339 break;
340 } 340 }
341 default: 341 default:
342 NOTREACHED(); 342 NOTREACHED();
343 return NULL; 343 return NULL;
344 } 344 }
345 { 345 {
346 base::AutoLock locker(objects_lock_); 346 base::AutoLock locker(objects_lock_);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 if (iter == objects_.end()) 482 if (iter == objects_.end())
483 return; 483 return;
484 JavaObjectWeakGlobalRef ref = 484 JavaObjectWeakGlobalRef ref =
485 RemoveHolderAndAdvanceLocked(GetCurrentRoutingID(), &iter); 485 RemoveHolderAndAdvanceLocked(GetCurrentRoutingID(), &iter);
486 if (!ref.is_empty()) { 486 if (!ref.is_empty()) {
487 RemoveFromRetainedObjectSetLocked(ref); 487 RemoveFromRetainedObjectSetLocked(ref);
488 } 488 }
489 } 489 }
490 490
491 } // namespace content 491 } // namespace content
OLDNEW
« no previous file with comments | « components/visitedlink/test/visitedlink_unittest.cc ('k') | content/browser/appcache/appcache_response.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698