| OLD | NEW |
| 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_PUBLIC_BROWSER_HISTOGRAM_FETCHER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_HISTOGRAM_FETCHER_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_HISTOGRAM_FETCHER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_HISTOGRAM_FETCHER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 | 12 |
| 13 namespace base { |
| 13 class MessageLoop; | 14 class MessageLoop; |
| 15 } |
| 14 | 16 |
| 15 namespace content { | 17 namespace content { |
| 16 | 18 |
| 17 // Fetch histogram data asynchronously from the various child processes, into | 19 // Fetch histogram data asynchronously from the various child processes, into |
| 18 // the browser process. This method is used by the metrics services in | 20 // the browser process. This method is used by the metrics services in |
| 19 // preparation for a log upload. It contacts all processes, and get them to | 21 // preparation for a log upload. It contacts all processes, and get them to |
| 20 // upload to the browser any/all changes to histograms. When all changes have | 22 // upload to the browser any/all changes to histograms. When all changes have |
| 21 // been acquired, or when the wait time expires (whichever is sooner), post the | 23 // been acquired, or when the wait time expires (whichever is sooner), post the |
| 22 // callback to the specified message loop. Note the callback is posted exactly | 24 // callback to the specified message loop. Note the callback is posted exactly |
| 23 // once. | 25 // once. |
| 24 CONTENT_EXPORT void FetchHistogramsAsynchronously(MessageLoop* callback_thread, | 26 CONTENT_EXPORT void FetchHistogramsAsynchronously( |
| 25 const base::Closure& callback, | 27 base::MessageLoop* callback_thread, |
| 26 base::TimeDelta wait_time); | 28 const base::Closure& callback, |
| 29 base::TimeDelta wait_time); |
| 30 |
| 27 } // namespace content | 31 } // namespace content |
| 28 | 32 |
| 29 #endif // CONTENT_PUBLIC_BROWSER_HISTOGRAM_FETCHER_H_ | 33 #endif // CONTENT_PUBLIC_BROWSER_HISTOGRAM_FETCHER_H_ |
| OLD | NEW |