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

Side by Side Diff: cc/test/test_webkit_platform.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 (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 "cc/test/test_webkit_platform.h" 5 #include "cc/test/test_webkit_platform.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 TestWebKitPlatform::TestWebKitPlatform() { 9 TestWebKitPlatform::TestWebKitPlatform() {
10 } 10 }
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 WebKit::WebThread* TestWebKitPlatform::currentThread() { 28 WebKit::WebThread* TestWebKitPlatform::currentThread() {
29 webkit_glue::WebThreadImplForMessageLoop* thread = 29 webkit_glue::WebThreadImplForMessageLoop* thread =
30 static_cast<WebThreadImplForMessageLoop*>(current_thread_slot_.Get()); 30 static_cast<WebThreadImplForMessageLoop*>(current_thread_slot_.Get());
31 if (thread) 31 if (thread)
32 return (thread); 32 return (thread);
33 33
34 scoped_refptr<base::MessageLoopProxy> message_loop = 34 scoped_refptr<base::MessageLoopProxy> message_loop =
35 base::MessageLoopProxy::current(); 35 base::MessageLoopProxy::current();
36 if (!message_loop) 36 if (!message_loop.get())
37 return NULL; 37 return NULL;
38 38
39 thread = new WebThreadImplForMessageLoop(message_loop); 39 thread = new WebThreadImplForMessageLoop(message_loop.get());
40 current_thread_slot_.Set(thread); 40 current_thread_slot_.Set(thread);
41 return thread; 41 return thread;
42 } 42 }
43 43
44 double TestWebKitPlatform::currentTime() { 44 double TestWebKitPlatform::currentTime() {
45 return base::Time::Now().ToDoubleT(); 45 return base::Time::Now().ToDoubleT();
46 } 46 }
47 47
48 double TestWebKitPlatform::monotonicallyIncreasingTime() { 48 double TestWebKitPlatform::monotonicallyIncreasingTime() {
49 return base::TimeTicks::Now().ToInternalValue() / 49 return base::TimeTicks::Now().ToInternalValue() /
50 static_cast<double>(base::Time::kMicrosecondsPerSecond); 50 static_cast<double>(base::Time::kMicrosecondsPerSecond);
51 } 51 }
52 52
53 } 53 }
OLDNEW
« no previous file with comments | « base/synchronization/waitable_event_watcher_posix.cc ('k') | chrome/browser/autocomplete/autocomplete_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698