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

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

Issue 345023: Get rid of MessageLoop* caching in extensions code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 | Annotate | Revision Log
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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 ExtensionsService *exstension_service = 548 ExtensionsService *exstension_service =
549 GetProfile()->GetOriginalProfile()->GetExtensionsService(); 549 GetProfile()->GetOriginalProfile()->GetExtensionsService();
550 550
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 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 558 ChromeThread::PostTask(
559 NewRunnableMethod(&chrome_url_data_manager, 559 ChromeThread::IO, FROM_HERE,
560 &ChromeURLDataManager::AddDataSource, html_source)); 560 NewRunnableMethod(
561 &chrome_url_data_manager, &ChromeURLDataManager::AddDataSource,
562 html_source));
561 } 563 }
562 564
563 // static 565 // static
564 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { 566 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() {
565 return ResourceBundle::GetSharedInstance(). 567 return ResourceBundle::GetSharedInstance().
566 LoadImageResourceBytes(IDR_PLUGIN); 568 LoadImageResourceBytes(IDR_PLUGIN);
567 } 569 }
568 570
569 // static 571 // static
570 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { 572 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) {
571 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); 573 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false);
572 } 574 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_service_unittest.cc ('k') | chrome/browser/extensions/image_loading_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698