| 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/flash_ui.h" | 5 #include "chrome/browser/ui/webui/flash_ui.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 // Crash information. | 295 // Crash information. |
| 296 AddPair(list, base::string16(), "--- Crash data ---"); | 296 AddPair(list, base::string16(), "--- Crash data ---"); |
| 297 bool crash_reporting_enabled = | 297 bool crash_reporting_enabled = |
| 298 ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(); | 298 ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(); |
| 299 if (crash_reporting_enabled) { | 299 if (crash_reporting_enabled) { |
| 300 std::vector<CrashUploadList::UploadInfo> crashes; | 300 std::vector<CrashUploadList::UploadInfo> crashes; |
| 301 upload_list_->GetUploads(10, &crashes); | 301 upload_list_->GetUploads(10, &crashes); |
| 302 | 302 |
| 303 for (std::vector<CrashUploadList::UploadInfo>::iterator i = crashes.begin(); | 303 for (std::vector<CrashUploadList::UploadInfo>::iterator i = crashes.begin(); |
| 304 i != crashes.end(); ++i) { | 304 i != crashes.end(); ++i) { |
| 305 base::string16 crash_string(ASCIIToUTF16(i->id)); | 305 base::string16 crash_string(ASCIIToUTF16(i->upload_id)); |
| 306 crash_string += ASCIIToUTF16(" "); | 306 crash_string += ASCIIToUTF16(" "); |
| 307 crash_string += base::TimeFormatFriendlyDateAndTime(i->time); | 307 crash_string += base::TimeFormatFriendlyDateAndTime(i->upload_time); |
| 308 AddPair(list, ASCIIToUTF16("crash id"), crash_string); | 308 AddPair(list, ASCIIToUTF16("crash id"), crash_string); |
| 309 } | 309 } |
| 310 } else { | 310 } else { |
| 311 AddPair(list, ASCIIToUTF16("Crash Reporting"), | 311 AddPair(list, ASCIIToUTF16("Crash Reporting"), |
| 312 "Enable crash reporting to see crash IDs"); | 312 "Enable crash reporting to see crash IDs"); |
| 313 AddPair(list, ASCIIToUTF16("For more details"), | 313 AddPair(list, ASCIIToUTF16("For more details"), |
| 314 chrome::kLearnMoreReportingURL); | 314 chrome::kLearnMoreReportingURL); |
| 315 } | 315 } |
| 316 | 316 |
| 317 // GPU information. | 317 // GPU information. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 Profile* profile = Profile::FromWebUI(web_ui); | 390 Profile* profile = Profile::FromWebUI(web_ui); |
| 391 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource()); | 391 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource()); |
| 392 } | 392 } |
| 393 | 393 |
| 394 // static | 394 // static |
| 395 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( | 395 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( |
| 396 ui::ScaleFactor scale_factor) { | 396 ui::ScaleFactor scale_factor) { |
| 397 // Use the default icon for now. | 397 // Use the default icon for now. |
| 398 return NULL; | 398 return NULL; |
| 399 } | 399 } |
| OLD | NEW |