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

Unified Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 5685007: Rename all methods accessing Singleton<T> as GetInstance(). (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model.cc ('k') | chrome/browser/ui/views/about_ipc_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/wrench_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 7eb2309d6aa77e7561d63593e7da2c1a8e9db8ef..0efd669b912a0192ab62ddcabf7713a3bf0807b5 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -62,7 +62,7 @@ const float kMenuBadgeFontSize = 12.0;
namespace {
SkBitmap GetBackgroundPageIcon() {
string16 pages = base::FormatNumber(
- BackgroundPageTracker::GetSingleton()->GetBackgroundPageCount());
+ BackgroundPageTracker::GetInstance()->GetBackgroundPageCount());
return badge_util::DrawBadgeIconOverlay(
*ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_BACKGROUND_MENU),
kMenuBadgeFontSize,
@@ -261,7 +261,7 @@ string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const {
#endif
case IDC_VIEW_BACKGROUND_PAGES: {
string16 num_background_pages = base::FormatNumber(
- BackgroundPageTracker::GetSingleton()->GetBackgroundPageCount());
+ BackgroundPageTracker::GetInstance()->GetBackgroundPageCount());
return l10n_util::GetStringFUTF16(IDS_VIEW_BACKGROUND_PAGES,
num_background_pages);
}
@@ -306,13 +306,13 @@ bool WrenchMenuModel::IsCommandIdVisible(int command_id) const {
} else if (command_id == IDC_VIEW_INCOMPATIBILITIES) {
#if defined(OS_WIN)
EnumerateModulesModel* loaded_modules =
- EnumerateModulesModel::GetSingleton();
+ EnumerateModulesModel::GetInstance();
return loaded_modules->confirmed_bad_modules_detected() > 0;
#else
return false;
#endif
} else if (command_id == IDC_VIEW_BACKGROUND_PAGES) {
- BackgroundPageTracker* tracker = BackgroundPageTracker::GetSingleton();
+ BackgroundPageTracker* tracker = BackgroundPageTracker::GetInstance();
return tracker->GetBackgroundPageCount() > 0;
}
return true;
@@ -351,7 +351,7 @@ void WrenchMenuModel::Observe(NotificationType type,
const NotificationDetails& details) {
switch (type.value) {
case NotificationType::BACKGROUND_PAGE_TRACKER_CHANGED: {
- int num_pages = BackgroundPageTracker::GetSingleton()->
+ int num_pages = BackgroundPageTracker::GetInstance()->
GetUnacknowledgedBackgroundPageCount();
if (num_pages > 0) {
SetIcon(GetIndexOfCommandId(IDC_VIEW_BACKGROUND_PAGES),
@@ -466,7 +466,7 @@ void WrenchMenuModel::Build() {
IDS_ABOUT, product_name));
}
string16 num_background_pages = base::FormatNumber(
- BackgroundPageTracker::GetSingleton()->GetBackgroundPageCount());
+ BackgroundPageTracker::GetInstance()->GetBackgroundPageCount());
AddItem(IDC_VIEW_BACKGROUND_PAGES, l10n_util::GetStringFUTF16(
IDS_VIEW_BACKGROUND_PAGES, num_background_pages));
AddItem(IDC_UPGRADE_DIALOG, l10n_util::GetStringFUTF16(
@@ -484,7 +484,7 @@ void WrenchMenuModel::Build() {
// Add an icon to the View Background Pages item if there are unacknowledged
// pages.
- if (BackgroundPageTracker::GetSingleton()->
+ if (BackgroundPageTracker::GetInstance()->
GetUnacknowledgedBackgroundPageCount() > 0) {
SetIcon(GetIndexOfCommandId(IDC_VIEW_BACKGROUND_PAGES),
GetBackgroundPageIcon());
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model.cc ('k') | chrome/browser/ui/views/about_ipc_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698