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

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

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « content/browser/histogram_message_filter.h ('k') | content/browser/host_zoom_map_impl.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 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 DefaultSingletonTraits<HistogramSynchronizer>;
79 79
80 class RequestContext; 80 class RequestContext;
81 81
82 HistogramSynchronizer(); 82 HistogramSynchronizer();
83 virtual ~HistogramSynchronizer(); 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.
89 void RegisterAndNotifyAllProcesses(ProcessHistogramRequester requester, 89 void RegisterAndNotifyAllProcesses(ProcessHistogramRequester requester,
90 base::TimeDelta wait_time); 90 base::TimeDelta wait_time);
91 91
92 // ------------------------------------------------------- 92 // -------------------------------------------------------
93 // HistogramSubscriber methods for browser child processes 93 // HistogramSubscriber methods for browser child processes
94 // ------------------------------------------------------- 94 // -------------------------------------------------------
95 95
96 // Update the number of pending processes for the given |sequence_number|. 96 // Update the number of pending processes for the given |sequence_number|.
97 // This is called on UI thread. 97 // This is called on UI thread.
98 virtual void OnPendingProcesses(int sequence_number, 98 void OnPendingProcesses(int sequence_number,
99 int pending_processes, 99 int pending_processes,
100 bool end) override; 100 bool end) override;
101 101
102 // Send histogram_data back to caller and also record that we are waiting 102 // Send histogram_data back to caller and also record that we are waiting
103 // for one less histogram data from child process for the given sequence 103 // for one less histogram data from child process for the given sequence
104 // number. This method is accessible on UI thread. 104 // number. This method is accessible on UI thread.
105 virtual void OnHistogramDataCollected( 105 void OnHistogramDataCollected(
106 int sequence_number, 106 int sequence_number,
107 const std::vector<std::string>& pickled_histograms) override; 107 const std::vector<std::string>& pickled_histograms) override;
108 108
109 // Set the callback_thread_ and callback_ members. If these members already 109 // Set the callback_thread_ and callback_ members. If these members already
110 // had values, then as a side effect, post the old callback_ to the old 110 // had values, then as a side effect, post the old callback_ to the old
111 // callaback_thread_. This side effect should not generally happen, but is in 111 // callaback_thread_. This side effect should not generally happen, but is in
112 // place to assure correctness (that any tasks that were set, are eventually 112 // place to assure correctness (that any tasks that were set, are eventually
113 // called, and never merely discarded). 113 // called, and never merely discarded).
114 void SetCallbackTaskAndThread(base::MessageLoop* callback_thread, 114 void SetCallbackTaskAndThread(base::MessageLoop* callback_thread,
115 const base::Closure& callback); 115 const base::Closure& callback);
(...skipping 29 matching lines...) Expand all
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_message_filter.h ('k') | content/browser/host_zoom_map_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698