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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm

Issue 451193003: Remove deprecated kBrowserActionContainerWidth pref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded includes Created 6 years, 4 months 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 | « no previous file | chrome/browser/ui/views/toolbar/browser_actions_container.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
index c8281f35767b690e79dd2cf2a83695466dc90445..1c8550ea3842443d9824089765186e039f4b4156 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
@@ -7,7 +7,6 @@
#include <cmath>
#include <string>
-#include "base/prefs/pref_service.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_action.h"
@@ -25,13 +24,11 @@
#import "chrome/browser/ui/cocoa/menu_button.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/extensions/api/extension_action/action_info.h"
-#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
#include "extensions/browser/extension_registry.h"
-#include "extensions/browser/pref_names.h"
#include "grit/theme_resources.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h"
@@ -379,19 +376,6 @@ class ExtensionServiceObserverBridge
- (CGFloat)savedWidth {
if (!toolbarModel_)
return 0;
- if (!profile_->GetPrefs()->HasPrefPath(
- extensions::pref_names::kToolbarSize)) {
- // Migration code to the new VisibleIconCount pref.
- // TODO(mpcomplete): remove this at some point.
- double predefinedWidth = profile_->GetPrefs()->GetDouble(
- extensions::pref_names::kBrowserActionContainerWidth);
- if (predefinedWidth != 0) {
- int iconWidth = kBrowserActionWidth + kBrowserActionButtonPadding;
- int extraWidth = kChevronWidth;
- toolbarModel_->SetVisibleIconCount(
- (predefinedWidth - extraWidth) / iconWidth);
- }
- }
int savedButtonCount = toolbarModel_->GetVisibleIconCount();
if (savedButtonCount < 0 || // all icons are visible
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698