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

Side by Side Diff: chrome/common/extensions/extension_localization_peer_unittest.cc

Issue 11720005: Remove a mysterious manual deletion of the (sync message) reply deserializer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/common/extensions/extension_localization_peer.h" 9 #include "chrome/common/extensions/extension_localization_peer.h"
10 #include "chrome/common/extensions/message_bundle.h" 10 #include "chrome/common/extensions/message_bundle.h"
(...skipping 14 matching lines...) Expand all
25 static const char* const kExtensionUrl_1 = 25 static const char* const kExtensionUrl_1 =
26 "chrome-extension://some_id/popup.css"; 26 "chrome-extension://some_id/popup.css";
27 27
28 static const char* const kExtensionUrl_2 = 28 static const char* const kExtensionUrl_2 =
29 "chrome-extension://some_id2/popup.css"; 29 "chrome-extension://some_id2/popup.css";
30 30
31 static const char* const kExtensionUrl_3 = 31 static const char* const kExtensionUrl_3 =
32 "chrome-extension://some_id3/popup.css"; 32 "chrome-extension://some_id3/popup.css";
33 33
34 void MessageDeleter(IPC::Message* message) { 34 void MessageDeleter(IPC::Message* message) {
35 delete static_cast<IPC::SyncMessage*>(message)->GetReplyDeserializer();
36 delete message; 35 delete message;
37 } 36 }
38 37
39 class MockIpcMessageSender : public IPC::Sender { 38 class MockIpcMessageSender : public IPC::Sender {
40 public: 39 public:
41 MockIpcMessageSender() { 40 MockIpcMessageSender() {
42 ON_CALL(*this, Send(_)) 41 ON_CALL(*this, Send(_))
43 .WillByDefault(DoAll(Invoke(MessageDeleter), Return(true))); 42 .WillByDefault(DoAll(Invoke(MessageDeleter), Return(true)));
44 } 43 }
45 44
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // __MSG_missing_message__ is missing, so message stays the same. 236 // __MSG_missing_message__ is missing, so message stays the same.
238 EXPECT_CALL(*original_peer_, 237 EXPECT_CALL(*original_peer_,
239 OnReceivedData(StrEq(message.data()), message.length(), -1)); 238 OnReceivedData(StrEq(message.data()), message.length(), -1));
240 239
241 EXPECT_CALL(*original_peer_, OnReceivedResponse(_)); 240 EXPECT_CALL(*original_peer_, OnReceivedResponse(_));
242 EXPECT_CALL(*original_peer_, OnCompletedRequest( 241 EXPECT_CALL(*original_peer_, OnCompletedRequest(
243 net::OK, false, "", base::TimeTicks())); 242 net::OK, false, "", base::TimeTicks()));
244 243
245 filter_peer->OnCompletedRequest(net::OK, false, "", base::TimeTicks()); 244 filter_peer->OnCompletedRequest(net::OK, false, "", base::TimeTicks());
246 } 245 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698