Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: chrome/browser/chromeos/dom_ui/system_info_ui.cc

Issue 6479007: Attempt 3 at: Splits ChromeURLDataManager into 2 chunks:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
21 #include "chrome/common/chrome_paths.h" 23 #include "chrome/common/chrome_paths.h"
22 #include "chrome/common/jstemplate_builder.h" 24 #include "chrome/common/jstemplate_builder.h"
23 #include "chrome/common/url_constants.h" 25 #include "chrome/common/url_constants.h"
24 #include "net/base/escape.h" 26 #include "net/base/escape.h"
25 #include "net/base/directory_lister.h" 27 #include "net/base/directory_lister.h"
26 #include "grit/browser_resources.h" 28 #include "grit/browser_resources.h"
27 #include "grit/chromium_strings.h" 29 #include "grit/chromium_strings.h"
28 #include "grit/generated_resources.h" 30 #include "grit/generated_resources.h"
29 #include "grit/locale_settings.h" 31 #include "grit/locale_settings.h"
30 #include "ui/base/l10n/l10n_util.h" 32 #include "ui/base/l10n/l10n_util.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // SystemInfoUI 174 // SystemInfoUI
173 // 175 //
174 //////////////////////////////////////////////////////////////////////////////// 176 ////////////////////////////////////////////////////////////////////////////////
175 177
176 SystemInfoUI::SystemInfoUI(TabContents* contents) : DOMUI(contents) { 178 SystemInfoUI::SystemInfoUI(TabContents* contents) : DOMUI(contents) {
177 SystemInfoHandler* handler = new SystemInfoHandler(); 179 SystemInfoHandler* handler = new SystemInfoHandler();
178 AddMessageHandler((handler)->Attach(this)); 180 AddMessageHandler((handler)->Attach(this));
179 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource(); 181 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource();
180 182
181 // Set up the chrome://system/ source. 183 // Set up the chrome://system/ source.
182 BrowserThread::PostTask( 184 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
183 BrowserThread::IO, FROM_HERE,
184 NewRunnableMethod(
185 ChromeURLDataManager::GetInstance(),
186 &ChromeURLDataManager::AddDataSource,
187 make_scoped_refptr(html_source)));
188 } 185 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698