| 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/chromeos/dom_ui/system_info_ui.h" | 5 #include "chrome/browser/chromeos/dom_ui/system_info_ui.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "base/weak_ptr.h" | 16 #include "base/weak_ptr.h" |
| 17 #include "chrome/browser/browser_thread.h" | 17 #include "chrome/browser/browser_thread.h" |
| 18 #include "chrome/browser/chromeos/cros/cros_library.h" | 18 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 19 #include "chrome/browser/chromeos/cros/syslogs_library.h" | 19 #include "chrome/browser/chromeos/cros/syslogs_library.h" |
| 20 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 20 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
| 21 #include "chrome/browser/profiles/profile.h" | |
| 22 #include "chrome/browser/tab_contents/tab_contents.h" | |
| 23 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
| 24 #include "chrome/common/jstemplate_builder.h" | 22 #include "chrome/common/jstemplate_builder.h" |
| 25 #include "chrome/common/url_constants.h" | 23 #include "chrome/common/url_constants.h" |
| 26 #include "net/base/escape.h" | 24 #include "net/base/escape.h" |
| 27 #include "net/base/directory_lister.h" | 25 #include "net/base/directory_lister.h" |
| 28 #include "grit/browser_resources.h" | 26 #include "grit/browser_resources.h" |
| 29 #include "grit/chromium_strings.h" | 27 #include "grit/chromium_strings.h" |
| 30 #include "grit/generated_resources.h" | 28 #include "grit/generated_resources.h" |
| 31 #include "grit/locale_settings.h" | 29 #include "grit/locale_settings.h" |
| 32 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // SystemInfoUI | 172 // SystemInfoUI |
| 175 // | 173 // |
| 176 //////////////////////////////////////////////////////////////////////////////// | 174 //////////////////////////////////////////////////////////////////////////////// |
| 177 | 175 |
| 178 SystemInfoUI::SystemInfoUI(TabContents* contents) : DOMUI(contents) { | 176 SystemInfoUI::SystemInfoUI(TabContents* contents) : DOMUI(contents) { |
| 179 SystemInfoHandler* handler = new SystemInfoHandler(); | 177 SystemInfoHandler* handler = new SystemInfoHandler(); |
| 180 AddMessageHandler((handler)->Attach(this)); | 178 AddMessageHandler((handler)->Attach(this)); |
| 181 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource(); | 179 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource(); |
| 182 | 180 |
| 183 // Set up the chrome://system/ source. | 181 // Set up the chrome://system/ source. |
| 184 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); | 182 BrowserThread::PostTask( |
| 183 BrowserThread::IO, FROM_HERE, |
| 184 NewRunnableMethod( |
| 185 ChromeURLDataManager::GetInstance(), |
| 186 &ChromeURLDataManager::AddDataSource, |
| 187 make_scoped_refptr(html_source))); |
| 185 } | 188 } |
| OLD | NEW |