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

Unified Diff: trunk/src/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm

Issue 19737005: Revert 212948 "Made MessagePump a non-thread safe class." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
===================================================================
--- trunk/src/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm (revision 212951)
+++ trunk/src/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm (working copy)
@@ -6,7 +6,7 @@
#import <QuartzCore/QuartzCore.h>
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ref_counted.h"
#include "base/message_loop/message_pump_mac.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "third_party/ocmock/gtest_support.h"
@@ -53,7 +53,7 @@
[[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]);
[controller showPanelForView:test_view()];
- scoped_ptr<base::MessagePumpNSRunLoop> message_pump(
+ scoped_refptr<base::MessagePumpNSRunLoop> message_pump(
new base::MessagePumpNSRunLoop);
id mock = [OCMockObject partialMockForObject:controller];
@@ -61,9 +61,8 @@
[[[mock expect] andForwardToRealObject] dismiss];
// Called after |-animationDidStop:finished:|.
- base::MessagePumpNSRunLoop* weak_message_pump = message_pump.get();
void (^quit_loop)(NSInvocation* invocation) = ^(NSInvocation* invocation) {
- weak_message_pump->Quit();
+ message_pump->Quit();
};
// Set up the mock to first forward to the real implementation and then call
// the above block to quit the run loop.

Powered by Google App Engine
This is Rietveld 408576698