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

Side by Side Diff: chrome/browser/extensions/extensions_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
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/extensions/extensions_ui.h" 5 #include "chrome/browser/extensions/extensions_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service); 936 ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service);
937 AddMessageHandler(handler); 937 AddMessageHandler(handler);
938 handler->Attach(this); 938 handler->Attach(this);
939 939
940 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); 940 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource();
941 941
942 // Set up the chrome://extensions/ source. 942 // Set up the chrome://extensions/ source.
943 BrowserThread::PostTask( 943 BrowserThread::PostTask(
944 BrowserThread::IO, FROM_HERE, 944 BrowserThread::IO, FROM_HERE,
945 NewRunnableMethod( 945 NewRunnableMethod(
946 Singleton<ChromeURLDataManager>::get(), 946 ChromeURLDataManager::GetInstance(),
947 &ChromeURLDataManager::AddDataSource, 947 &ChromeURLDataManager::AddDataSource,
948 make_scoped_refptr(html_source))); 948 make_scoped_refptr(html_source)));
949 } 949 }
950 950
951 // static 951 // static
952 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { 952 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() {
953 return ResourceBundle::GetSharedInstance(). 953 return ResourceBundle::GetSharedInstance().
954 LoadDataResourceBytes(IDR_PLUGIN); 954 LoadDataResourceBytes(IDR_PLUGIN);
955 } 955 }
956 956
957 // static 957 // static
958 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 958 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
959 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); 959 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false);
960 } 960 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.cc ('k') | chrome/browser/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698