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

Side by Side Diff: extensions/browser/script_executor.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 | « extensions/browser/sandboxed_unpacker.cc ('k') | extensions/browser/user_script_loader.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 "extensions/browser/script_executor.h" 5 #include "extensions/browser/script_executor.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/pickle.h" 10 #include "base/pickle.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 ~Handler() override {} 48 ~Handler() override {}
49 49
50 bool OnMessageReceived(const IPC::Message& message) override { 50 bool OnMessageReceived(const IPC::Message& message) override {
51 // Unpack by hand to check the request_id, since there may be multiple 51 // Unpack by hand to check the request_id, since there may be multiple
52 // requests in flight but only one is for this. 52 // requests in flight but only one is for this.
53 if (message.type() != ExtensionHostMsg_ExecuteCodeFinished::ID) 53 if (message.type() != ExtensionHostMsg_ExecuteCodeFinished::ID)
54 return false; 54 return false;
55 55
56 int message_request_id; 56 int message_request_id;
57 PickleIterator iter(message); 57 base::PickleIterator iter(message);
58 CHECK(iter.ReadInt(&message_request_id)); 58 CHECK(iter.ReadInt(&message_request_id));
59 59
60 if (message_request_id != request_id_) 60 if (message_request_id != request_id_)
61 return false; 61 return false;
62 62
63 IPC_BEGIN_MESSAGE_MAP(Handler, message) 63 IPC_BEGIN_MESSAGE_MAP(Handler, message)
64 IPC_MESSAGE_HANDLER(ExtensionHostMsg_ExecuteCodeFinished, 64 IPC_MESSAGE_HANDLER(ExtensionHostMsg_ExecuteCodeFinished,
65 OnExecuteCodeFinished) 65 OnExecuteCodeFinished)
66 IPC_END_MESSAGE_MAP() 66 IPC_END_MESSAGE_MAP()
67 return true; 67 return true;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 params.webview_src = webview_src; 151 params.webview_src = webview_src;
152 params.file_url = file_url; 152 params.file_url = file_url;
153 params.wants_result = (result_type == JSON_SERIALIZED_RESULT); 153 params.wants_result = (result_type == JSON_SERIALIZED_RESULT);
154 params.user_gesture = user_gesture; 154 params.user_gesture = user_gesture;
155 155
156 // Handler handles IPCs and deletes itself on completion. 156 // Handler handles IPCs and deletes itself on completion.
157 new Handler(script_observers_, web_contents_, params, callback); 157 new Handler(script_observers_, web_contents_, params, callback);
158 } 158 }
159 159
160 } // namespace extensions 160 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/sandboxed_unpacker.cc ('k') | extensions/browser/user_script_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698