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

Side by Side Diff: content/browser/histogram_synchronizer.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 | « content/browser/histogram_controller.cc ('k') | content/browser/histogram_synchronizer.cc » ('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 CONTENT_BROWSER_HISTOGRAM_SYNCHRONIZER_H_ 5 #ifndef CONTENT_BROWSER_HISTOGRAM_SYNCHRONIZER_H_
6 #define CONTENT_BROWSER_HISTOGRAM_SYNCHRONIZER_H_ 6 #define CONTENT_BROWSER_HISTOGRAM_SYNCHRONIZER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // Contact all child processes, and get them to upload to the browser any/all 69 // Contact all child processes, and get them to upload to the browser any/all
70 // changes to histograms. When all changes have been acquired, or when the 70 // changes to histograms. When all changes have been acquired, or when the
71 // wait time expires (whichever is sooner), post the callback to the 71 // wait time expires (whichever is sooner), post the callback to the
72 // specified message loop. Note the callback is posted exactly once. 72 // specified message loop. Note the callback is posted exactly once.
73 static void FetchHistogramsAsynchronously(base::MessageLoop* callback_thread, 73 static void FetchHistogramsAsynchronously(base::MessageLoop* callback_thread,
74 const base::Closure& callback, 74 const base::Closure& callback,
75 base::TimeDelta wait_time); 75 base::TimeDelta wait_time);
76 76
77 private: 77 private:
78 friend struct DefaultSingletonTraits<HistogramSynchronizer>; 78 friend struct base::DefaultSingletonTraits<HistogramSynchronizer>;
79 79
80 class RequestContext; 80 class RequestContext;
81 81
82 HistogramSynchronizer(); 82 HistogramSynchronizer();
83 ~HistogramSynchronizer() override; 83 ~HistogramSynchronizer() override;
84 84
85 // Establish a new sequence number, and use it to notify all processes 85 // Establish a new sequence number, and use it to notify all processes
86 // (renderers, plugins, GPU, etc) of the need to supply, to the browser, 86 // (renderers, plugins, GPU, etc) of the need to supply, to the browser,
87 // any/all changes to their histograms. |wait_time| specifies the amount of 87 // any/all changes to their histograms. |wait_time| specifies the amount of
88 // time to wait before cancelling the requests for non-responsive processes. 88 // time to wait before cancelling the requests for non-responsive processes.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // The sequence number used by the most recent asynchronous update request to 145 // The sequence number used by the most recent asynchronous update request to
146 // contact all processes. 146 // contact all processes.
147 int async_sequence_number_; 147 int async_sequence_number_;
148 148
149 DISALLOW_COPY_AND_ASSIGN(HistogramSynchronizer); 149 DISALLOW_COPY_AND_ASSIGN(HistogramSynchronizer);
150 }; 150 };
151 151
152 } // namespace content 152 } // namespace content
153 153
154 #endif // CONTENT_BROWSER_HISTOGRAM_SYNCHRONIZER_H_ 154 #endif // CONTENT_BROWSER_HISTOGRAM_SYNCHRONIZER_H_
OLDNEW
« no previous file with comments | « content/browser/histogram_controller.cc ('k') | content/browser/histogram_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698