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

Side by Side Diff: chrome/browser/dom_ui/plugins_ui.cc

Issue 6461024: Revert 74292 - Splits ChromeURLDataManager into 2 chunks:... (Closed) Base URL: svn://svn.chromium.org/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
« no previous file with comments | « chrome/browser/dom_ui/options/options_ui.cc ('k') | chrome/browser/dom_ui/print_preview_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/dom_ui/plugins_ui.h" 5 #include "chrome/browser/dom_ui/plugins_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 // PluginsUI 342 // PluginsUI
343 // 343 //
344 /////////////////////////////////////////////////////////////////////////////// 344 ///////////////////////////////////////////////////////////////////////////////
345 345
346 PluginsUI::PluginsUI(TabContents* contents) : DOMUI(contents) { 346 PluginsUI::PluginsUI(TabContents* contents) : DOMUI(contents) {
347 AddMessageHandler((new PluginsDOMHandler())->Attach(this)); 347 AddMessageHandler((new PluginsDOMHandler())->Attach(this));
348 348
349 PluginsUIHTMLSource* html_source = new PluginsUIHTMLSource(); 349 PluginsUIHTMLSource* html_source = new PluginsUIHTMLSource();
350 350
351 // Set up the chrome://plugins/ source. 351 // Set up the chrome://plugins/ source.
352 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); 352 BrowserThread::PostTask(
353 BrowserThread::IO, FROM_HERE,
354 NewRunnableMethod(ChromeURLDataManager::GetInstance(),
355 &ChromeURLDataManager::AddDataSource,
356 make_scoped_refptr(html_source)));
353 } 357 }
354 358
355 359
356 // static 360 // static
357 RefCountedMemory* PluginsUI::GetFaviconResourceBytes() { 361 RefCountedMemory* PluginsUI::GetFaviconResourceBytes() {
358 return ResourceBundle::GetSharedInstance(). 362 return ResourceBundle::GetSharedInstance().
359 LoadDataResourceBytes(IDR_PLUGIN); 363 LoadDataResourceBytes(IDR_PLUGIN);
360 } 364 }
361 365
362 // static 366 // static
363 void PluginsUI::RegisterUserPrefs(PrefService* prefs) { 367 void PluginsUI::RegisterUserPrefs(PrefService* prefs) {
364 FilePath internal_dir; 368 FilePath internal_dir;
365 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); 369 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir);
366 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, 370 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory,
367 internal_dir); 371 internal_dir);
368 372
369 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist); 373 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist);
370 prefs->RegisterListPref(prefs::kPluginsPluginsList); 374 prefs->RegisterListPref(prefs::kPluginsPluginsList);
371 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false); 375 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false);
372 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails, false); 376 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails, false);
373 } 377 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/options/options_ui.cc ('k') | chrome/browser/dom_ui/print_preview_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698