Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Side by Side Diff: base/tracked_objects.cc

Issue 645133002: Prefix CommandLine usege with base namespace (Part 1: base/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated #3 Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/test/test_timeouts.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/tracked_objects.h" 5 #include "base/tracked_objects.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include "base/atomicops.h" 10 #include "base/atomicops.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ENABLED_TIMING, 60 ENABLED_TIMING,
61 DISABLED_TIMING, 61 DISABLED_TIMING,
62 }; 62 };
63 static base::subtle::Atomic32 timing_enabled = UNDEFINED_TIMING; 63 static base::subtle::Atomic32 timing_enabled = UNDEFINED_TIMING;
64 // Reading |timing_enabled| is done without barrier because multiple 64 // Reading |timing_enabled| is done without barrier because multiple
65 // initialization is not an issue while the barrier can be relatively costly 65 // initialization is not an issue while the barrier can be relatively costly
66 // given that this method is sometimes called in a tight loop. 66 // given that this method is sometimes called in a tight loop.
67 base::subtle::Atomic32 current_timing_enabled = 67 base::subtle::Atomic32 current_timing_enabled =
68 base::subtle::NoBarrier_Load(&timing_enabled); 68 base::subtle::NoBarrier_Load(&timing_enabled);
69 if (current_timing_enabled == UNDEFINED_TIMING) { 69 if (current_timing_enabled == UNDEFINED_TIMING) {
70 if (!CommandLine::InitializedForCurrentProcess()) 70 if (!base::CommandLine::InitializedForCurrentProcess())
71 return true; 71 return true;
72 current_timing_enabled = 72 current_timing_enabled =
73 (CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 73 (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
74 switches::kProfilerTiming) == 74 switches::kProfilerTiming) ==
75 switches::kProfilerTimingDisabledValue) 75 switches::kProfilerTimingDisabledValue)
76 ? DISABLED_TIMING 76 ? DISABLED_TIMING
77 : ENABLED_TIMING; 77 : ENABLED_TIMING;
78 base::subtle::NoBarrier_Store(&timing_enabled, current_timing_enabled); 78 base::subtle::NoBarrier_Store(&timing_enabled, current_timing_enabled);
79 } 79 }
80 return current_timing_enabled == ENABLED_TIMING; 80 return current_timing_enabled == ENABLED_TIMING;
81 } 81 }
82 82
83 } // namespace 83 } // namespace
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 : process_id(base::GetCurrentProcId()) { 969 : process_id(base::GetCurrentProcId()) {
970 #else 970 #else
971 : process_id(0) { 971 : process_id(0) {
972 #endif 972 #endif
973 } 973 }
974 974
975 ProcessDataSnapshot::~ProcessDataSnapshot() { 975 ProcessDataSnapshot::~ProcessDataSnapshot() {
976 } 976 }
977 977
978 } // namespace tracked_objects 978 } // namespace tracked_objects
OLDNEW
« no previous file with comments | « base/test/test_timeouts.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698