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

Side by Side Diff: chrome/browser/extensions/extensions_ui.cc

Issue 350007: Convert chrome_url_data_manager (previously a global) into a Singleton. This (Closed)
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « chrome/browser/dom_ui/print_ui.cc ('k') | chrome/browser/sync/sync_setup_wizard.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/extensions/extensions_ui.h" 5 #include "chrome/browser/extensions/extensions_ui.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/thread.h" 10 #include "base/thread.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service); 551 ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service);
552 AddMessageHandler(handler); 552 AddMessageHandler(handler);
553 handler->Attach(this); 553 handler->Attach(this);
554 554
555 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); 555 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource();
556 556
557 // Set up the chrome://extensions/ source. 557 // Set up the chrome://extensions/ source.
558 ChromeThread::PostTask( 558 ChromeThread::PostTask(
559 ChromeThread::IO, FROM_HERE, 559 ChromeThread::IO, FROM_HERE,
560 NewRunnableMethod( 560 NewRunnableMethod(
561 &chrome_url_data_manager, &ChromeURLDataManager::AddDataSource, 561 Singleton<ChromeURLDataManager>().get(),
562 &ChromeURLDataManager::AddDataSource,
562 html_source)); 563 html_source));
563 } 564 }
564 565
565 // static 566 // static
566 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { 567 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() {
567 return ResourceBundle::GetSharedInstance(). 568 return ResourceBundle::GetSharedInstance().
568 LoadImageResourceBytes(IDR_PLUGIN); 569 LoadImageResourceBytes(IDR_PLUGIN);
569 } 570 }
570 571
571 // static 572 // static
572 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 573 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
573 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); 574 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false);
574 } 575 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/print_ui.cc ('k') | chrome/browser/sync/sync_setup_wizard.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698