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

Side by Side Diff: components/html_viewer/blink_platform_impl.cc

Issue 1411843008: Make blink platform time consistent with the timer virtual time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CachingCorrectnessTest Created 5 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 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 "components/html_viewer/blink_platform_impl.h" 5 #include "components/html_viewer/blink_platform_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 blink::WebString BlinkPlatformImpl::defaultLocale() { 119 blink::WebString BlinkPlatformImpl::defaultLocale() {
120 return blink::WebString::fromUTF8("en-US"); 120 return blink::WebString::fromUTF8("en-US");
121 } 121 }
122 122
123 blink::WebBlobRegistry* BlinkPlatformImpl::blobRegistry() { 123 blink::WebBlobRegistry* BlinkPlatformImpl::blobRegistry() {
124 return &blob_registry_; 124 return &blob_registry_;
125 } 125 }
126 126
127 double BlinkPlatformImpl::currentTime() { 127 double BlinkPlatformImpl::currentTimeSeconds() {
128 return base::Time::Now().ToDoubleT(); 128 return base::Time::Now().ToDoubleT();
129 } 129 }
130 130
131 double BlinkPlatformImpl::monotonicallyIncreasingTime() { 131 double BlinkPlatformImpl::monotonicallyIncreasingTimeSeconds() {
132 return base::TimeTicks::Now().ToInternalValue() / 132 return base::TimeTicks::Now().ToInternalValue() /
133 static_cast<double>(base::Time::kMicrosecondsPerSecond); 133 static_cast<double>(base::Time::kMicrosecondsPerSecond);
134 } 134 }
135 135
136 void BlinkPlatformImpl::cryptographicallyRandomValues(unsigned char* buffer, 136 void BlinkPlatformImpl::cryptographicallyRandomValues(unsigned char* buffer,
137 size_t length) { 137 size_t length) {
138 base::RandBytes(buffer, length); 138 base::RandBytes(buffer, length);
139 } 139 }
140 140
141 bool BlinkPlatformImpl::isThreadedCompositingEnabled() { 141 bool BlinkPlatformImpl::isThreadedCompositingEnabled() {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 BlinkPlatformImpl::notificationManager() { 316 BlinkPlatformImpl::notificationManager() {
317 return &web_notification_manager_; 317 return &web_notification_manager_;
318 } 318 }
319 319
320 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) { 320 void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) {
321 DCHECK(!current_thread_slot_.Get()); 321 DCHECK(!current_thread_slot_.Get());
322 current_thread_slot_.Set(thread); 322 current_thread_slot_.Set(thread);
323 } 323 }
324 324
325 } // namespace html_viewer 325 } // namespace html_viewer
OLDNEW
« no previous file with comments | « components/html_viewer/blink_platform_impl.h ('k') | components/scheduler/base/task_queue_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698