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

Side by Side Diff: webkit/browser/fileapi/timed_task_helper_unittest.cc

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/browser/fileapi/sandbox_quota_observer.cc ('k') | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "webkit/browser/fileapi/timed_task_helper.h" 13 #include "webkit/browser/fileapi/timed_task_helper.h"
14 14
15 namespace fileapi { 15 namespace fileapi {
16 16
17 namespace { 17 namespace {
18 18
19 class Embedder { 19 class Embedder {
20 public: 20 public:
21 Embedder() 21 Embedder()
22 : timer_(base::MessageLoopProxy::current()), 22 : timer_(base::MessageLoopProxy::current().get()), timer_fired_(false) {}
23 timer_fired_(false) {}
24 23
25 void OnTimerFired() { 24 void OnTimerFired() {
26 timer_fired_ = true; 25 timer_fired_ = true;
27 } 26 }
28 27
29 TimedTaskHelper* timer() { return &timer_; } 28 TimedTaskHelper* timer() { return &timer_; }
30 bool timer_fired() const { return timer_fired_; } 29 bool timer_fired() const { return timer_fired_; }
31 30
32 private: 31 private:
33 TimedTaskHelper timer_; 32 TimedTaskHelper timer_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 74
76 ASSERT_TRUE(embedder.timer()->IsRunning()); 75 ASSERT_TRUE(embedder.timer()->IsRunning());
77 } 76 }
78 77
79 // At this point the callback is still in the message queue but 78 // At this point the callback is still in the message queue but
80 // embedder is gone. 79 // embedder is gone.
81 base::MessageLoop::current()->RunUntilIdle(); 80 base::MessageLoop::current()->RunUntilIdle();
82 } 81 }
83 82
84 } // namespace fileapi 83 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/sandbox_quota_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698