OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/webui/crashes_ui.h" | 5 #include "chrome/browser/ui/webui/crashes_ui.h" |
6 | 6 |
7 #include "base/i18n/time_formatting.h" | 7 #include "base/i18n/time_formatting.h" |
8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "content/browser/tab_contents/tab_contents.h" | 21 #include "content/browser/tab_contents/tab_contents.h" |
22 #include "grit/browser_resources.h" | 22 #include "grit/browser_resources.h" |
23 #include "grit/chromium_strings.h" | 23 #include "grit/chromium_strings.h" |
24 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
25 #include "grit/theme_resources.h" | 25 #include "grit/theme_resources.h" |
26 #include "grit/theme_resources_standard.h" | 26 #include "grit/theme_resources_standard.h" |
27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
28 #include "ui/base/resource/resource_bundle.h" | 28 #include "ui/base/resource/resource_bundle.h" |
29 | 29 |
30 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
31 #include "chrome/browser/chromeos/metrics_cros_settings_provider.h" | 31 #include "chrome/browser/chromeos/user_cros_settings_provider.h" |
32 #endif | 32 #endif |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 ChromeWebUIDataSource* CreateCrashesUIHTMLSource() { | 36 ChromeWebUIDataSource* CreateCrashesUIHTMLSource() { |
37 ChromeWebUIDataSource* source = | 37 ChromeWebUIDataSource* source = |
38 new ChromeWebUIDataSource(chrome::kChromeUICrashesHost); | 38 new ChromeWebUIDataSource(chrome::kChromeUICrashesHost); |
39 | 39 |
40 source->AddLocalizedString("crashesTitle", IDS_CRASHES_TITLE); | 40 source->AddLocalizedString("crashesTitle", IDS_CRASHES_TITLE); |
41 source->AddLocalizedString("crashCountFormat", | 41 source->AddLocalizedString("crashCountFormat", |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 return ResourceBundle::GetSharedInstance(). | 168 return ResourceBundle::GetSharedInstance(). |
169 LoadDataResourceBytes(IDR_SAD_FAVICON); | 169 LoadDataResourceBytes(IDR_SAD_FAVICON); |
170 } | 170 } |
171 | 171 |
172 // static | 172 // static |
173 bool CrashesUI::CrashReportingEnabled() { | 173 bool CrashesUI::CrashReportingEnabled() { |
174 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) | 174 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) |
175 PrefService* prefs = g_browser_process->local_state(); | 175 PrefService* prefs = g_browser_process->local_state(); |
176 return prefs->GetBoolean(prefs::kMetricsReportingEnabled); | 176 return prefs->GetBoolean(prefs::kMetricsReportingEnabled); |
177 #elif defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) | 177 #elif defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) |
178 return chromeos::MetricsCrosSettingsProvider::GetMetricsStatus(); | 178 return chromeos::UserCrosSettingsProvider::cached_reporting_enabled(); |
179 #else | 179 #else |
180 return false; | 180 return false; |
181 #endif | 181 #endif |
182 } | 182 } |
OLD | NEW |