| OLD | NEW |
| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 scoped_refptr<CrashUploadList> upload_list_; | 121 scoped_refptr<CrashUploadList> upload_list_; |
| 122 bool list_available_; | 122 bool list_available_; |
| 123 bool js_request_pending_; | 123 bool js_request_pending_; |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(CrashesDOMHandler); | 125 DISALLOW_COPY_AND_ASSIGN(CrashesDOMHandler); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 CrashesDOMHandler::CrashesDOMHandler() | 128 CrashesDOMHandler::CrashesDOMHandler() |
| 129 : list_available_(false), js_request_pending_(false) { | 129 : list_available_(false), js_request_pending_(false) { |
| 130 upload_list_ = new CrashUploadList(this); | 130 upload_list_ = CrashUploadList::Create(this); |
| 131 } | 131 } |
| 132 | 132 |
| 133 CrashesDOMHandler::~CrashesDOMHandler() { | 133 CrashesDOMHandler::~CrashesDOMHandler() { |
| 134 upload_list_->ClearDelegate(); | 134 upload_list_->ClearDelegate(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 WebUIMessageHandler* CrashesDOMHandler::Attach(WebUI* web_ui) { | 137 WebUIMessageHandler* CrashesDOMHandler::Attach(WebUI* web_ui) { |
| 138 upload_list_->LoadCrashListAsynchronously(); | 138 upload_list_->LoadCrashListAsynchronously(); |
| 139 return WebUIMessageHandler::Attach(web_ui); | 139 return WebUIMessageHandler::Attach(web_ui); |
| 140 } | 140 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 204 |
| 205 // Set up the chrome://crashes/ source. | 205 // Set up the chrome://crashes/ source. |
| 206 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); | 206 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
| 207 } | 207 } |
| 208 | 208 |
| 209 // static | 209 // static |
| 210 RefCountedMemory* CrashesUI::GetFaviconResourceBytes() { | 210 RefCountedMemory* CrashesUI::GetFaviconResourceBytes() { |
| 211 return ResourceBundle::GetSharedInstance(). | 211 return ResourceBundle::GetSharedInstance(). |
| 212 LoadDataResourceBytes(IDR_SAD_FAVICON); | 212 LoadDataResourceBytes(IDR_SAD_FAVICON); |
| 213 } | 213 } |
| OLD | NEW |