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

Side by Side Diff: base/threading/thread_restrictions.h

Issue 502173002: Move more metrics classes to metrics namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test compile. Created 6 years, 4 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 | « no previous file | chrome/browser/browser_process.h » ('j') | 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 #ifndef BASE_THREADING_THREAD_RESTRICTIONS_H_ 5 #ifndef BASE_THREADING_THREAD_RESTRICTIONS_H_
6 #define BASE_THREADING_THREAD_RESTRICTIONS_H_ 6 #define BASE_THREADING_THREAD_RESTRICTIONS_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
11 // See comment at top of thread_checker.h 11 // See comment at top of thread_checker.h
12 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) 12 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON))
13 #define ENABLE_THREAD_RESTRICTIONS 1 13 #define ENABLE_THREAD_RESTRICTIONS 1
14 #else 14 #else
15 #define ENABLE_THREAD_RESTRICTIONS 0 15 #define ENABLE_THREAD_RESTRICTIONS 0
16 #endif 16 #endif
17 17
18 class AcceleratedPresenter; 18 class AcceleratedPresenter;
19 class BrowserProcessImpl; 19 class BrowserProcessImpl;
20 class HistogramSynchronizer; 20 class HistogramSynchronizer;
21 class MetricsService;
22 class NativeBackendKWallet; 21 class NativeBackendKWallet;
23 class ScopedAllowWaitForLegacyWebViewApi; 22 class ScopedAllowWaitForLegacyWebViewApi;
24 class TestingAutomationProvider; 23 class TestingAutomationProvider;
25 24
26 namespace browser_sync { 25 namespace browser_sync {
27 class NonFrontendDataTypeController; 26 class NonFrontendDataTypeController;
28 class UIModelWorker; 27 class UIModelWorker;
29 } 28 }
30 namespace cc { 29 namespace cc {
31 class CompletionEvent; 30 class CompletionEvent;
(...skipping 22 matching lines...) Expand all
54 namespace dbus { 53 namespace dbus {
55 class Bus; 54 class Bus;
56 } 55 }
57 namespace disk_cache { 56 namespace disk_cache {
58 class BackendImpl; 57 class BackendImpl;
59 class InFlightIO; 58 class InFlightIO;
60 } 59 }
61 namespace media { 60 namespace media {
62 class AudioOutputController; 61 class AudioOutputController;
63 } 62 }
63 namespace metrics {
64 class MetricsService;
65 }
64 namespace mojo { 66 namespace mojo {
65 namespace common { 67 namespace common {
66 class WatcherThreadManager; 68 class WatcherThreadManager;
67 } 69 }
68 } 70 }
69 namespace net { 71 namespace net {
70 class FileStreamPosix; 72 class FileStreamPosix;
71 class FileStreamWin; 73 class FileStreamWin;
72 namespace internal { 74 namespace internal {
73 class AddressTrackerLinux; 75 class AddressTrackerLinux;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 friend class content::TextInputClientMac; // http://crbug.com/121917 218 friend class content::TextInputClientMac; // http://crbug.com/121917
217 friend class dbus::Bus; // http://crbug.com/125222 219 friend class dbus::Bus; // http://crbug.com/125222
218 friend class disk_cache::BackendImpl; // http://crbug.com/74623 220 friend class disk_cache::BackendImpl; // http://crbug.com/74623
219 friend class disk_cache::InFlightIO; // http://crbug.com/74623 221 friend class disk_cache::InFlightIO; // http://crbug.com/74623
220 friend class media::AudioOutputController; // http://crbug.com/120973 222 friend class media::AudioOutputController; // http://crbug.com/120973
221 friend class net::FileStreamPosix; // http://crbug.com/115067 223 friend class net::FileStreamPosix; // http://crbug.com/115067
222 friend class net::FileStreamWin; // http://crbug.com/115067 224 friend class net::FileStreamWin; // http://crbug.com/115067
223 friend class net::internal::AddressTrackerLinux; // http://crbug.com/125097 225 friend class net::internal::AddressTrackerLinux; // http://crbug.com/125097
224 friend class ::AcceleratedPresenter; // http://crbug.com/125391 226 friend class ::AcceleratedPresenter; // http://crbug.com/125391
225 friend class ::BrowserProcessImpl; // http://crbug.com/125207 227 friend class ::BrowserProcessImpl; // http://crbug.com/125207
226 friend class ::MetricsService; // http://crbug.com/124954 228 friend class metrics::MetricsService; // http://crbug.com/124954
227 friend class ::NativeBackendKWallet; // http://crbug.com/125331 229 friend class ::NativeBackendKWallet; // http://crbug.com/125331
228 // END USAGE THAT NEEDS TO BE FIXED. 230 // END USAGE THAT NEEDS TO BE FIXED.
229 231
230 #if ENABLE_THREAD_RESTRICTIONS 232 #if ENABLE_THREAD_RESTRICTIONS
231 static bool SetWaitAllowed(bool allowed); 233 static bool SetWaitAllowed(bool allowed);
232 #else 234 #else
233 static bool SetWaitAllowed(bool allowed) { return true; } 235 static bool SetWaitAllowed(bool allowed) { return true; }
234 #endif 236 #endif
235 237
236 // Constructing a ScopedAllowWait temporarily allows waiting on the current 238 // Constructing a ScopedAllowWait temporarily allows waiting on the current
(...skipping 11 matching lines...) Expand all
248 250
249 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); 251 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait);
250 }; 252 };
251 253
252 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); 254 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions);
253 }; 255 };
254 256
255 } // namespace base 257 } // namespace base
256 258
257 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ 259 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698