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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the previous fix Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import "browser_actions_controller.h" 5 #import "browser_actions_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <string> 8 #include <string>
9 9
10 #include "app/mac/nsimage_cache.h" 10 #include "app/mac/nsimage_cache.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 return NO; 412 return NO;
413 } else if (effect == NSViewAnimationFadeOutEffect) { 413 } else if (effect == NSViewAnimationFadeOutEffect) {
414 return YES; 414 return YES;
415 } 415 }
416 416
417 NOTREACHED(); 417 NOTREACHED();
418 return YES; 418 return YES;
419 } 419 }
420 420
421 + (void)registerUserPrefs:(PrefService*)prefs { 421 + (void)registerUserPrefs:(PrefService*)prefs {
422 prefs->RegisterDoublePref(prefs::kBrowserActionContainerWidth, 0); 422 prefs->RegisterDoublePref(prefs::kBrowserActionContainerWidth,
423 0,
424 false /* don't sync pref */);
423 } 425 }
424 426
425 #pragma mark - 427 #pragma mark -
426 #pragma mark Private Methods 428 #pragma mark Private Methods
427 429
428 - (void)createButtons { 430 - (void)createButtons {
429 if (!toolbarModel_) 431 if (!toolbarModel_)
430 return; 432 return;
431 433
432 NSUInteger i = 0; 434 NSUInteger i = 0;
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 if (profile_->IsOffTheRecord()) 861 if (profile_->IsOffTheRecord())
860 index = toolbarModel_->IncognitoIndexToOriginal(index); 862 index = toolbarModel_->IncognitoIndexToOriginal(index);
861 if (index < toolbarModel_->size()) { 863 if (index < toolbarModel_->size()) {
862 const Extension* extension = toolbarModel_->GetExtensionByIndex(index); 864 const Extension* extension = toolbarModel_->GetExtensionByIndex(index);
863 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; 865 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())];
864 } 866 }
865 return nil; 867 return nil;
866 } 868 }
867 869
868 @end 870 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698