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

Side by Side Diff: chrome/browser/dom_ui/downloads_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/downloads_dom_handler.cc ('k') | chrome/browser/dom_ui/filebrowse_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/downloads_ui.h" 5 #include "chrome/browser/dom_ui/downloads_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/singleton.h" 9 #include "base/singleton.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 DownloadsDOMHandler* handler = new DownloadsDOMHandler(dlm); 129 DownloadsDOMHandler* handler = new DownloadsDOMHandler(dlm);
130 AddMessageHandler(handler); 130 AddMessageHandler(handler);
131 handler->Attach(this); 131 handler->Attach(this);
132 handler->Init(); 132 handler->Init();
133 133
134 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource(); 134 DownloadsUIHTMLSource* html_source = new DownloadsUIHTMLSource();
135 135
136 // Set up the chrome://downloads/ source. 136 // Set up the chrome://downloads/ source.
137 BrowserThread::PostTask( 137 BrowserThread::PostTask(
138 BrowserThread::IO, FROM_HERE, 138 BrowserThread::IO, FROM_HERE,
139 NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), 139 NewRunnableMethod(ChromeURLDataManager::GetInstance(),
140 &ChromeURLDataManager::AddDataSource, 140 &ChromeURLDataManager::AddDataSource,
141 make_scoped_refptr(html_source))); 141 make_scoped_refptr(html_source)));
142 } 142 }
143 143
144 // static 144 // static
145 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { 145 RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() {
146 return ResourceBundle::GetSharedInstance(). 146 return ResourceBundle::GetSharedInstance().
147 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); 147 LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON);
148 } 148 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/downloads_dom_handler.cc ('k') | chrome/browser/dom_ui/filebrowse_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698