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