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 <stddef.h> | 7 #include <stddef.h> |
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 // Show crash reports regardless of |crash_reporting_enabled| so that users | 182 // Show crash reports regardless of |crash_reporting_enabled| so that users |
183 // can manually upload those reports. | 183 // can manually upload those reports. |
184 upload_list = true; | 184 upload_list = true; |
185 #endif | 185 #endif |
186 | 186 |
187 base::ListValue crash_list; | 187 base::ListValue crash_list; |
188 if (upload_list) | 188 if (upload_list) |
189 crash::UploadListToValue(upload_list_.get(), &crash_list); | 189 crash::UploadListToValue(upload_list_.get(), &crash_list); |
190 | 190 |
191 base::FundamentalValue enabled(crash_reporting_enabled); | 191 base::Value enabled(crash_reporting_enabled); |
192 base::FundamentalValue dynamic_backend(system_crash_reporter); | 192 base::Value dynamic_backend(system_crash_reporter); |
193 base::FundamentalValue manual_uploads(support_manual_uploads); | 193 base::Value manual_uploads(support_manual_uploads); |
194 base::StringValue version(version_info::GetVersionNumber()); | 194 base::StringValue version(version_info::GetVersionNumber()); |
195 base::StringValue os_string(base::SysInfo::OperatingSystemName() + " " + | 195 base::StringValue os_string(base::SysInfo::OperatingSystemName() + " " + |
196 base::SysInfo::OperatingSystemVersion()); | 196 base::SysInfo::OperatingSystemVersion()); |
197 | 197 |
198 std::vector<const base::Value*> args; | 198 std::vector<const base::Value*> args; |
199 args.push_back(&enabled); | 199 args.push_back(&enabled); |
200 args.push_back(&dynamic_backend); | 200 args.push_back(&dynamic_backend); |
201 args.push_back(&manual_uploads); | 201 args.push_back(&manual_uploads); |
202 args.push_back(&crash_list); | 202 args.push_back(&crash_list); |
203 args.push_back(&version); | 203 args.push_back(&version); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 Profile* profile = Profile::FromWebUI(web_ui); | 237 Profile* profile = Profile::FromWebUI(web_ui); |
238 content::WebUIDataSource::Add(profile, CreateCrashesUIHTMLSource()); | 238 content::WebUIDataSource::Add(profile, CreateCrashesUIHTMLSource()); |
239 } | 239 } |
240 | 240 |
241 // static | 241 // static |
242 base::RefCountedMemory* CrashesUI::GetFaviconResourceBytes( | 242 base::RefCountedMemory* CrashesUI::GetFaviconResourceBytes( |
243 ui::ScaleFactor scale_factor) { | 243 ui::ScaleFactor scale_factor) { |
244 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( | 244 return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( |
245 IDR_CRASH_SAD_FAVICON, scale_factor); | 245 IDR_CRASH_SAD_FAVICON, scale_factor); |
246 } | 246 } |
OLD | NEW |