Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <type_traits> | 5 #include <type_traits> |
| 6 | 6 |
| 7 namespace not_blink { | 7 namespace not_blink { |
| 8 | 8 |
| 9 void function(int x) {} | 9 void function(int x) {} |
| 10 | 10 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 331 | 331 |
| 332 template <typename T> | 332 template <typename T> |
| 333 class IntrusiveHeap { | 333 class IntrusiveHeap { |
| 334 public: | 334 public: |
| 335 // https://crbug.com/672353: |begin| shouldn't be rewritten to |Begin|. | 335 // https://crbug.com/672353: |begin| shouldn't be rewritten to |Begin|. |
| 336 const T* begin() const { return nullptr; } | 336 const T* begin() const { return nullptr; } |
| 337 }; | 337 }; |
| 338 | 338 |
| 339 } // namespace blacklisting_of_renaming_of_begin_method | 339 } // namespace blacklisting_of_renaming_of_begin_method |
| 340 | 340 |
| 341 namespace specializations { | |
| 342 | |
| 343 template <unsigned long sizeOfValue> | |
| 344 int ToV8SignedIntegerInternal(long value); | |
| 345 | |
| 346 template <> | |
| 347 int ToV8SignedIntegerInternal<4>(long value) { | |
| 348 return 123 + value; | |
| 349 } | |
| 350 | |
| 351 template <> | |
| 352 int ToV8SignedIntegerInternal<8>(long value) { | |
| 353 return 456 + value; | |
| 354 } | |
| 355 | |
| 356 int ToV8(int value) { | |
| 357 return ToV8SignedIntegerInternal<sizeof value>(value); | |
| 358 } | |
| 359 | |
| 360 int ToV8(long value) { | |
| 361 return ToV8SignedIntegerInternal<sizeof value>(value); | |
| 362 } | |
| 363 | |
| 364 } // namespace specializations | |
| 365 | |
|
Łukasz Anforowicz
2017/01/21 01:04:01
These tests are somewhat unrelated to the main cha
| |
| 341 } // namespace blink | 366 } // namespace blink |
| 342 | 367 |
| 343 namespace not_blink { | 368 namespace not_blink { |
| 344 | 369 |
| 345 namespace cxx_dependent_scope_member_expr_testing { | 370 namespace cxx_dependent_scope_member_expr_testing { |
| 346 | 371 |
| 347 class Base : public ::blink::cxx_dependent_scope_member_expr_testing::Class { | 372 class Base : public ::blink::cxx_dependent_scope_member_expr_testing::Class { |
| 348 public: | 373 public: |
| 349 virtual void virtualMethod() {} | 374 virtual void virtualMethod() {} |
| 350 }; | 375 }; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 371 // Need to rewrite |f| to |F| below (because this method name | 396 // Need to rewrite |f| to |F| below (because this method name |
| 372 // does get rewritten when processing blink::test_unnamed_arg::Class). | 397 // does get rewritten when processing blink::test_unnamed_arg::Class). |
| 373 // See also https://crbug.com/670434. | 398 // See also https://crbug.com/670434. |
| 374 output->F(123); | 399 output->F(123); |
| 375 } | 400 } |
| 376 }; | 401 }; |
| 377 | 402 |
| 378 } // namespace blink_methods_called_from_mojo_traits_are_not_rewritten | 403 } // namespace blink_methods_called_from_mojo_traits_are_not_rewritten |
| 379 | 404 |
| 380 } // namespace not_blink | 405 } // namespace not_blink |
| OLD | NEW |