| 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> | 7 #include <stddef.h> | 
| 8 | 8 | 
| 9 #include <string> | 9 #include <string> | 
| 10 | 10 | 
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" | 
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" | 
| 13 #include "base/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" | 
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" | 
| 15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" | 
| 16 #include "chrome/browser/plugins/plugin_prefs.h" | 16 #include "chrome/browser/plugins/plugin_prefs.h" | 
| 17 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" | 
| 18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" | 
| 19 #include "components/metrics/proto/system_profile.pb.h" | 19 #include "components/metrics/proto/system_profile.pb.h" | 
| 20 #include "components/prefs/pref_registry_simple.h" | 20 #include "components/prefs/pref_registry_simple.h" | 
| 21 #include "components/prefs/pref_service.h" | 21 #include "components/prefs/pref_service.h" | 
| 22 #include "components/prefs/scoped_user_pref_update.h" | 22 #include "components/prefs/scoped_user_pref_update.h" | 
| 23 #include "content/public/browser/child_process_data.h" | 23 #include "content/public/browser/child_process_data.h" | 
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 378 } | 378 } | 
| 379 | 379 | 
| 380 bool PluginMetricsProvider::RecordCurrentStateIfPending() { | 380 bool PluginMetricsProvider::RecordCurrentStateIfPending() { | 
| 381   if (!weak_ptr_factory_.HasWeakPtrs()) | 381   if (!weak_ptr_factory_.HasWeakPtrs()) | 
| 382     return false; | 382     return false; | 
| 383 | 383 | 
| 384   weak_ptr_factory_.InvalidateWeakPtrs(); | 384   weak_ptr_factory_.InvalidateWeakPtrs(); | 
| 385   RecordCurrentState(); | 385   RecordCurrentState(); | 
| 386   return true; | 386   return true; | 
| 387 } | 387 } | 
| OLD | NEW | 
|---|