| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/conflicts_ui.h" | 5 #include "chrome/browser/dom_ui/conflicts_ui.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 void ConflictsDOMHandler::RegisterMessages() { | 136 void ConflictsDOMHandler::RegisterMessages() { |
| 137 dom_ui_->RegisterMessageCallback("requestModuleList", | 137 dom_ui_->RegisterMessageCallback("requestModuleList", |
| 138 NewCallback(this, &ConflictsDOMHandler::HandleRequestModuleList)); | 138 NewCallback(this, &ConflictsDOMHandler::HandleRequestModuleList)); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void ConflictsDOMHandler::HandleRequestModuleList(const ListValue* args) { | 141 void ConflictsDOMHandler::HandleRequestModuleList(const ListValue* args) { |
| 142 // This request is handled asynchronously. See Observe for when we reply back. | 142 // This request is handled asynchronously. See Observe for when we reply back. |
| 143 registrar_.Add(this, NotificationType::MODULE_LIST_ENUMERATED, | 143 registrar_.Add(this, NotificationType::MODULE_LIST_ENUMERATED, |
| 144 NotificationService::AllSources()); | 144 NotificationService::AllSources()); |
| 145 EnumerateModulesModel::GetSingleton()->ScanNow(); | 145 EnumerateModulesModel::GetInstance()->ScanNow(); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void ConflictsDOMHandler::SendModuleList() { | 148 void ConflictsDOMHandler::SendModuleList() { |
| 149 EnumerateModulesModel* loaded_modules = EnumerateModulesModel::GetSingleton(); | 149 EnumerateModulesModel* loaded_modules = EnumerateModulesModel::GetInstance(); |
| 150 ListValue* list = loaded_modules->GetModuleList(); | 150 ListValue* list = loaded_modules->GetModuleList(); |
| 151 DictionaryValue results; | 151 DictionaryValue results; |
| 152 results.Set("moduleList", list); | 152 results.Set("moduleList", list); |
| 153 | 153 |
| 154 // Add the section title and the total count for bad modules found. | 154 // Add the section title and the total count for bad modules found. |
| 155 int confirmed_bad = loaded_modules->confirmed_bad_modules_detected(); | 155 int confirmed_bad = loaded_modules->confirmed_bad_modules_detected(); |
| 156 int suspected_bad = loaded_modules->suspected_bad_modules_detected(); | 156 int suspected_bad = loaded_modules->suspected_bad_modules_detected(); |
| 157 string16 table_title; | 157 string16 table_title; |
| 158 if (!confirmed_bad && !suspected_bad) { | 158 if (!confirmed_bad && !suspected_bad) { |
| 159 table_title += l10n_util::GetStringFUTF16( | 159 table_title += l10n_util::GetStringFUTF16( |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 make_scoped_refptr(html_source))); | 209 make_scoped_refptr(html_source))); |
| 210 } | 210 } |
| 211 | 211 |
| 212 // static | 212 // static |
| 213 RefCountedMemory* ConflictsUI::GetFaviconResourceBytes() { | 213 RefCountedMemory* ConflictsUI::GetFaviconResourceBytes() { |
| 214 return ResourceBundle::GetSharedInstance(). | 214 return ResourceBundle::GetSharedInstance(). |
| 215 LoadDataResourceBytes(IDR_CONFLICT_FAVICON); | 215 LoadDataResourceBytes(IDR_CONFLICT_FAVICON); |
| 216 } | 216 } |
| 217 | 217 |
| 218 #endif | 218 #endif |
| OLD | NEW |