OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/gpu/gpu_mode_manager.h" | 5 #include "chrome/browser/gpu/gpu_mode_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/prefs/pref_registry_simple.h" | |
10 #include "base/prefs/pref_service.h" | |
11 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
12 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| 11 #include "components/prefs/pref_registry_simple.h" |
| 12 #include "components/prefs/pref_service.h" |
13 #include "content/public/browser/gpu_data_manager.h" | 13 #include "content/public/browser/gpu_data_manager.h" |
14 #include "content/public/browser/user_metrics.h" | 14 #include "content/public/browser/user_metrics.h" |
15 | 15 |
16 using base::UserMetricsAction; | 16 using base::UserMetricsAction; |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 bool GetPreviousGpuModePref() { | 20 bool GetPreviousGpuModePref() { |
21 PrefService* service = g_browser_process->local_state(); | 21 PrefService* service = g_browser_process->local_state(); |
22 DCHECK(service); | 22 DCHECK(service); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 } | 77 } |
78 | 78 |
79 // static | 79 // static |
80 bool GpuModeManager::IsGpuModePrefEnabled() { | 80 bool GpuModeManager::IsGpuModePrefEnabled() { |
81 PrefService* service = g_browser_process->local_state(); | 81 PrefService* service = g_browser_process->local_state(); |
82 DCHECK(service); | 82 DCHECK(service); |
83 return service->GetBoolean( | 83 return service->GetBoolean( |
84 prefs::kHardwareAccelerationModeEnabled); | 84 prefs::kHardwareAccelerationModeEnabled); |
85 } | 85 } |
86 | 86 |
OLD | NEW |