OLD | NEW |
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 "webkit/glue/webkitplatformsupport_impl.h" | 5 #include "webkit/glue/webkitplatformsupport_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 // Copied from histogram macro, but without the static variable caching | 442 // Copied from histogram macro, but without the static variable caching |
443 // the histogram because name is dynamic. | 443 // the histogram because name is dynamic. |
444 base::HistogramBase* counter = | 444 base::HistogramBase* counter = |
445 base::LinearHistogram::FactoryGet(name, 1, boundary_value, | 445 base::LinearHistogram::FactoryGet(name, 1, boundary_value, |
446 boundary_value + 1, base::HistogramBase::kUmaTargetedHistogramFlag); | 446 boundary_value + 1, base::HistogramBase::kUmaTargetedHistogramFlag); |
447 DCHECK_EQ(name, counter->histogram_name()); | 447 DCHECK_EQ(name, counter->histogram_name()); |
448 counter->Add(sample); | 448 counter->Add(sample); |
449 } | 449 } |
450 | 450 |
451 const unsigned char* WebKitPlatformSupportImpl::getTraceCategoryEnabledFlag( | 451 const unsigned char* WebKitPlatformSupportImpl::getTraceCategoryEnabledFlag( |
452 const char* category_name) { | 452 const char* category_group) { |
453 return TRACE_EVENT_API_GET_CATEGORY_ENABLED(category_name); | 453 return TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category_group); |
454 } | 454 } |
455 | 455 |
456 void WebKitPlatformSupportImpl::addTraceEvent( | 456 void WebKitPlatformSupportImpl::addTraceEvent( |
457 char phase, | 457 char phase, |
458 const unsigned char* category_enabled, | 458 const unsigned char* category_group_enabled, |
459 const char* name, | 459 const char* name, |
460 unsigned long long id, | 460 unsigned long long id, |
461 int num_args, | 461 int num_args, |
462 const char** arg_names, | 462 const char** arg_names, |
463 const unsigned char* arg_types, | 463 const unsigned char* arg_types, |
464 const unsigned long long* arg_values, | 464 const unsigned long long* arg_values, |
465 unsigned char flags) { | 465 unsigned char flags) { |
466 TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_enabled, name, id, | 466 TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_group_enabled, name, id, |
467 num_args, arg_names, arg_types, | 467 num_args, arg_names, arg_types, |
468 arg_values, flags); | 468 arg_values, flags); |
469 } | 469 } |
470 | 470 |
471 | 471 |
472 namespace { | 472 namespace { |
473 | 473 |
474 WebData loadAudioSpatializationResource(WebKitPlatformSupportImpl* platform, | 474 WebData loadAudioSpatializationResource(WebKitPlatformSupportImpl* platform, |
475 const char* name) { | 475 const char* name) { |
476 #ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 | 476 #ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 return NULL; | 952 return NULL; |
953 scoped_ptr<WebDiscardableMemoryImpl> discardable( | 953 scoped_ptr<WebDiscardableMemoryImpl> discardable( |
954 new WebDiscardableMemoryImpl()); | 954 new WebDiscardableMemoryImpl()); |
955 if (discardable->InitializeAndLock(bytes)) | 955 if (discardable->InitializeAndLock(bytes)) |
956 return discardable.release(); | 956 return discardable.release(); |
957 return NULL; | 957 return NULL; |
958 } | 958 } |
959 | 959 |
960 | 960 |
961 } // namespace webkit_glue | 961 } // namespace webkit_glue |
OLD | NEW |