Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: chrome/browser/ui/webui/crashes_ui.cc

Issue 7480040: Rewire the metrics pref to the signed settings store on chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to ToT. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698