OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 #endif | 37 #endif |
38 | 38 |
39 using content::WebContents; | 39 using content::WebContents; |
40 using content::WebUIMessageHandler; | 40 using content::WebUIMessageHandler; |
41 | 41 |
42 namespace { | 42 namespace { |
43 | 43 |
44 ChromeWebUIDataSource* CreateCrashesUIHTMLSource() { | 44 ChromeWebUIDataSource* CreateCrashesUIHTMLSource() { |
45 ChromeWebUIDataSource* source = | 45 ChromeWebUIDataSource* source = |
46 new ChromeWebUIDataSource(chrome::kChromeUICrashesHost); | 46 new ChromeWebUIDataSource(chrome::kChromeUICrashesHost); |
| 47 source->set_use_json_js_format_v2(); |
47 | 48 |
48 source->AddLocalizedString("crashesTitle", IDS_CRASHES_TITLE); | 49 source->AddLocalizedString("crashesTitle", IDS_CRASHES_TITLE); |
49 source->AddLocalizedString("crashCountFormat", | 50 source->AddLocalizedString("crashCountFormat", |
50 IDS_CRASHES_CRASH_COUNT_BANNER_FORMAT); | 51 IDS_CRASHES_CRASH_COUNT_BANNER_FORMAT); |
51 source->AddLocalizedString("crashHeaderFormat", | 52 source->AddLocalizedString("crashHeaderFormat", |
52 IDS_CRASHES_CRASH_HEADER_FORMAT); | 53 IDS_CRASHES_CRASH_HEADER_FORMAT); |
53 source->AddLocalizedString("crashTimeFormat", IDS_CRASHES_CRASH_TIME_FORMAT); | 54 source->AddLocalizedString("crashTimeFormat", IDS_CRASHES_CRASH_TIME_FORMAT); |
54 source->AddLocalizedString("bugLinkText", IDS_CRASHES_BUG_LINK_LABEL); | 55 source->AddLocalizedString("bugLinkText", IDS_CRASHES_BUG_LINK_LABEL); |
55 source->AddLocalizedString("noCrashesMessage", | 56 source->AddLocalizedString("noCrashesMessage", |
56 IDS_CRASHES_NO_CRASHES_MESSAGE); | 57 IDS_CRASHES_NO_CRASHES_MESSAGE); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 return prefs->GetBoolean(prefs::kMetricsReportingEnabled); | 182 return prefs->GetBoolean(prefs::kMetricsReportingEnabled); |
182 #elif defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) | 183 #elif defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) |
183 bool reporting_enabled = false; | 184 bool reporting_enabled = false; |
184 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, | 185 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, |
185 &reporting_enabled); | 186 &reporting_enabled); |
186 return reporting_enabled; | 187 return reporting_enabled; |
187 #else | 188 #else |
188 return false; | 189 return false; |
189 #endif | 190 #endif |
190 } | 191 } |
OLD | NEW |