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

Side by Side Diff: chrome/browser/dom_ui/bookmarks_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/cross_site_request_manager.cc ('k') | chrome/browser/dom_ui/bug_report_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/bookmarks_ui.h" 5 #include "chrome/browser/dom_ui/bookmarks_ui.h"
6 6
7 #include "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/ref_counted_memory.h" 9 #include "base/ref_counted_memory.h"
10 #include "base/singleton.h" 10 #include "base/singleton.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // 44 //
45 //////////////////////////////////////////////////////////////////////////////// 45 ////////////////////////////////////////////////////////////////////////////////
46 46
47 BookmarksUI::BookmarksUI(TabContents* contents) : DOMUI(contents) { 47 BookmarksUI::BookmarksUI(TabContents* contents) : DOMUI(contents) {
48 BookmarksUIHTMLSource* html_source = new BookmarksUIHTMLSource(); 48 BookmarksUIHTMLSource* html_source = new BookmarksUIHTMLSource();
49 49
50 // Set up the chrome://bookmarks/ source. 50 // Set up the chrome://bookmarks/ source.
51 BrowserThread::PostTask( 51 BrowserThread::PostTask(
52 BrowserThread::IO, FROM_HERE, 52 BrowserThread::IO, FROM_HERE,
53 NewRunnableMethod( 53 NewRunnableMethod(
54 Singleton<ChromeURLDataManager>::get(), 54 ChromeURLDataManager::GetInstance(),
55 &ChromeURLDataManager::AddDataSource, 55 &ChromeURLDataManager::AddDataSource,
56 make_scoped_refptr(html_source))); 56 make_scoped_refptr(html_source)));
57 } 57 }
58 58
59 // static 59 // static
60 RefCountedMemory* BookmarksUI::GetFaviconResourceBytes() { 60 RefCountedMemory* BookmarksUI::GetFaviconResourceBytes() {
61 return ResourceBundle::GetSharedInstance(). 61 return ResourceBundle::GetSharedInstance().
62 LoadDataResourceBytes(IDR_BOOKMARKS_FAVICON); 62 LoadDataResourceBytes(IDR_BOOKMARKS_FAVICON);
63 } 63 }
OLDNEW
« no previous file with comments | « chrome/browser/cross_site_request_manager.cc ('k') | chrome/browser/dom_ui/bug_report_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698