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

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

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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) 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/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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 /////////////////////////////////////////////////////////////////////////////// 309 ///////////////////////////////////////////////////////////////////////////////
310 310
311 PluginsUI::PluginsUI(TabContents* contents) : DOMUI(contents) { 311 PluginsUI::PluginsUI(TabContents* contents) : DOMUI(contents) {
312 AddMessageHandler((new PluginsDOMHandler())->Attach(this)); 312 AddMessageHandler((new PluginsDOMHandler())->Attach(this));
313 313
314 PluginsUIHTMLSource* html_source = new PluginsUIHTMLSource(); 314 PluginsUIHTMLSource* html_source = new PluginsUIHTMLSource();
315 315
316 // Set up the chrome://plugins/ source. 316 // Set up the chrome://plugins/ source.
317 BrowserThread::PostTask( 317 BrowserThread::PostTask(
318 BrowserThread::IO, FROM_HERE, 318 BrowserThread::IO, FROM_HERE,
319 NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), 319 NewRunnableMethod(ChromeURLDataManager::GetInstance(),
320 &ChromeURLDataManager::AddDataSource, 320 &ChromeURLDataManager::AddDataSource,
321 make_scoped_refptr(html_source))); 321 make_scoped_refptr(html_source)));
322 } 322 }
323 323
324 324
325 // static 325 // static
326 RefCountedMemory* PluginsUI::GetFaviconResourceBytes() { 326 RefCountedMemory* PluginsUI::GetFaviconResourceBytes() {
327 return ResourceBundle::GetSharedInstance(). 327 return ResourceBundle::GetSharedInstance().
328 LoadDataResourceBytes(IDR_PLUGIN); 328 LoadDataResourceBytes(IDR_PLUGIN);
329 } 329 }
330 330
331 // static 331 // static
332 void PluginsUI::RegisterUserPrefs(PrefService* prefs) { 332 void PluginsUI::RegisterUserPrefs(PrefService* prefs) {
333 FilePath internal_dir; 333 FilePath internal_dir;
334 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); 334 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir);
335 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, 335 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory,
336 internal_dir); 336 internal_dir);
337 337
338 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist); 338 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist);
339 prefs->RegisterListPref(prefs::kPluginsPluginsList); 339 prefs->RegisterListPref(prefs::kPluginsPluginsList);
340 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false); 340 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false);
341 } 341 }
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