OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 scoped_refptr<base::Histogram> counter = | 277 scoped_refptr<base::Histogram> counter = |
278 base::LinearHistogram::FactoryGet(name, 1, boundary_value, | 278 base::LinearHistogram::FactoryGet(name, 1, boundary_value, |
279 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); | 279 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); |
280 DCHECK_EQ(name, counter->histogram_name()); | 280 DCHECK_EQ(name, counter->histogram_name()); |
281 if (counter.get()) | 281 if (counter.get()) |
282 counter->Add(sample); | 282 counter->Add(sample); |
283 } | 283 } |
284 | 284 |
285 void WebKitClientImpl::traceEventBegin(const char* name, void* id, | 285 void WebKitClientImpl::traceEventBegin(const char* name, void* id, |
286 const char* extra) { | 286 const char* extra) { |
287 TRACE_EVENT_BEGIN(name, id, extra); | 287 TRACE_EVENT_BEGIN_LEGACY(name, id, extra); |
288 } | 288 } |
289 | 289 |
290 void WebKitClientImpl::traceEventEnd(const char* name, void* id, | 290 void WebKitClientImpl::traceEventEnd(const char* name, void* id, |
291 const char* extra) { | 291 const char* extra) { |
292 TRACE_EVENT_END(name, id, extra); | 292 TRACE_EVENT_END_LEGACY(name, id, extra); |
293 } | 293 } |
294 | 294 |
295 namespace { | 295 namespace { |
296 | 296 |
297 WebData loadAudioSpatializationResource(const char* name) { | 297 WebData loadAudioSpatializationResource(const char* name) { |
298 #ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 | 298 #ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 |
299 const size_t kExpectedSpatializationNameLength = 31; | 299 const size_t kExpectedSpatializationNameLength = 31; |
300 if (strlen(name) != kExpectedSpatializationNameLength) { | 300 if (strlen(name) != kExpectedSpatializationNameLength) { |
301 return WebData(); | 301 return WebData(); |
302 } | 302 } |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 ++shared_timer_suspended_; | 581 ++shared_timer_suspended_; |
582 } | 582 } |
583 | 583 |
584 void WebKitClientImpl::ResumeSharedTimer() { | 584 void WebKitClientImpl::ResumeSharedTimer() { |
585 // The shared timer may have fired or been adjusted while we were suspended. | 585 // The shared timer may have fired or been adjusted while we were suspended. |
586 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) | 586 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) |
587 setSharedTimerFireTime(shared_timer_fire_time_); | 587 setSharedTimerFireTime(shared_timer_fire_time_); |
588 } | 588 } |
589 | 589 |
590 } // namespace webkit_glue | 590 } // namespace webkit_glue |
OLD | NEW |