| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/glue/webkitclient_impl.h" | 5 #include "webkit/glue/webkitclient_impl.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <malloc.h> | 8 #include <malloc.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 // the histogram because name is dynamic. | 283 // the histogram because name is dynamic. |
| 284 base::Histogram* counter = | 284 base::Histogram* counter = |
| 285 base::LinearHistogram::FactoryGet(name, 1, boundary_value, | 285 base::LinearHistogram::FactoryGet(name, 1, boundary_value, |
| 286 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); | 286 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); |
| 287 DCHECK_EQ(name, counter->histogram_name()); | 287 DCHECK_EQ(name, counter->histogram_name()); |
| 288 counter->Add(sample); | 288 counter->Add(sample); |
| 289 } | 289 } |
| 290 | 290 |
| 291 void WebKitClientImpl::traceEventBegin(const char* name, void* id, | 291 void WebKitClientImpl::traceEventBegin(const char* name, void* id, |
| 292 const char* extra) { | 292 const char* extra) { |
| 293 TRACE_EVENT_BEGIN_ETW(name, id, extra); | 293 TRACE_EVENT_BEGIN_ETW(name, id, std::string(extra)); |
| 294 } | 294 } |
| 295 | 295 |
| 296 void WebKitClientImpl::traceEventEnd(const char* name, void* id, | 296 void WebKitClientImpl::traceEventEnd(const char* name, void* id, |
| 297 const char* extra) { | 297 const char* extra) { |
| 298 TRACE_EVENT_END_ETW(name, id, extra); | 298 TRACE_EVENT_END_ETW(name, id, std::string(extra)); |
| 299 } | 299 } |
| 300 | 300 |
| 301 namespace { | 301 namespace { |
| 302 | 302 |
| 303 WebData loadAudioSpatializationResource(const char* name) { | 303 WebData loadAudioSpatializationResource(const char* name) { |
| 304 #ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 | 304 #ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 |
| 305 const size_t kExpectedSpatializationNameLength = 31; | 305 const size_t kExpectedSpatializationNameLength = 31; |
| 306 if (strlen(name) != kExpectedSpatializationNameLength) { | 306 if (strlen(name) != kExpectedSpatializationNameLength) { |
| 307 return WebData(); | 307 return WebData(); |
| 308 } | 308 } |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 | 649 |
| 650 void WebKitClientImpl::ResumeSharedTimer() { | 650 void WebKitClientImpl::ResumeSharedTimer() { |
| 651 // The shared timer may have fired or been adjusted while we were suspended. | 651 // The shared timer may have fired or been adjusted while we were suspended. |
| 652 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) { | 652 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) { |
| 653 setSharedTimerFireInterval( | 653 setSharedTimerFireInterval( |
| 654 monotonicallyIncreasingTime() - shared_timer_fire_time_); | 654 monotonicallyIncreasingTime() - shared_timer_fire_time_); |
| 655 } | 655 } |
| 656 } | 656 } |
| 657 | 657 |
| 658 } // namespace webkit_glue | 658 } // namespace webkit_glue |
| OLD | NEW |