OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/metrics/plugin_metrics_provider.h" | 5 #include "chrome/browser/metrics/plugin_metrics_provider.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <string> | 9 #include <string> |
8 | 10 |
9 #include "base/prefs/pref_registry_simple.h" | 11 #include "base/prefs/pref_registry_simple.h" |
10 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
11 #include "base/prefs/scoped_user_pref_update.h" | 13 #include "base/prefs/scoped_user_pref_update.h" |
12 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
13 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
14 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
15 #include "base/time/time.h" | 17 #include "base/time/time.h" |
16 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 } | 385 } |
384 | 386 |
385 bool PluginMetricsProvider::RecordCurrentStateIfPending() { | 387 bool PluginMetricsProvider::RecordCurrentStateIfPending() { |
386 if (!weak_ptr_factory_.HasWeakPtrs()) | 388 if (!weak_ptr_factory_.HasWeakPtrs()) |
387 return false; | 389 return false; |
388 | 390 |
389 weak_ptr_factory_.InvalidateWeakPtrs(); | 391 weak_ptr_factory_.InvalidateWeakPtrs(); |
390 RecordCurrentState(); | 392 RecordCurrentState(); |
391 return true; | 393 return true; |
392 } | 394 } |
OLD | NEW |