OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 namespace blink { | 5 namespace blink { |
6 | 6 |
7 // Global variables | 7 // Global variables |
8 int frame_count = 0; | 8 int frame_count = 0; |
9 // Make sure that underscore-insertion doesn't get too confused by acronyms. | 9 // Make sure that underscore-insertion doesn't get too confused by acronyms. |
10 static int variable_mentioning_http_and_https = 1; | 10 static int variable_mentioning_http_and_https = 1; |
11 // Already Google style, should not change. | 11 // Already Google style, should not change. |
12 int already_google_style_; | 12 int already_google_style_; |
13 | 13 |
14 // Function parameters | 14 // Function parameters |
15 int Function(int interesting_number) { | 15 int Function(int interesting_number) { |
16 // Local variables. | 16 // Local variables. |
17 int a_local_variable = 1; | 17 int a_local_variable = 1; |
18 // Static locals. | 18 // Static locals. |
19 static int a_static_local_variable = 2; | 19 static int a_static_local_variable = 2; |
20 // Make sure references to variables are also rewritten. | 20 // Make sure references to variables are also rewritten. |
21 return frame_count + | 21 return frame_count + |
22 variable_mentioning_http_and_https * interesting_number / | 22 variable_mentioning_http_and_https * interesting_number / |
23 a_local_variable % a_static_local_variable; | 23 a_local_variable % a_static_local_variable; |
24 } | 24 } |
25 | 25 |
26 } // namespace blink | 26 } // namespace blink |
| 27 |
| 28 int F() { |
| 29 // Make sure variables qualified with a namespace name are still rewritten |
| 30 // correctly. |
| 31 return blink::frame_count; |
| 32 } |
OLD | NEW |