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

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: Self review 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 return NO; 411 return NO;
412 } else if (effect == NSViewAnimationFadeOutEffect) { 412 } else if (effect == NSViewAnimationFadeOutEffect) {
413 return YES; 413 return YES;
414 } 414 }
415 415
416 NOTREACHED(); 416 NOTREACHED();
417 return YES; 417 return YES;
418 } 418 }
419 419
420 + (void)registerUserPrefs:(PrefService*)prefs { 420 + (void)registerUserPrefs:(PrefService*)prefs {
421 prefs->RegisterDoublePref(prefs::kBrowserActionContainerWidth, 0); 421 prefs->RegisterDoublePref(prefs::kBrowserActionContainerWidth,
422 0,
423 false /* don't sync pref */);
422 } 424 }
423 425
424 #pragma mark - 426 #pragma mark -
425 #pragma mark Private Methods 427 #pragma mark Private Methods
426 428
427 - (void)createButtons { 429 - (void)createButtons {
428 if (!toolbarModel_) 430 if (!toolbarModel_)
429 return; 431 return;
430 432
431 NSUInteger i = 0; 433 NSUInteger i = 0;
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 if (profile_->IsOffTheRecord()) 865 if (profile_->IsOffTheRecord())
864 index = toolbarModel_->IncognitoIndexToOriginal(index); 866 index = toolbarModel_->IncognitoIndexToOriginal(index);
865 if (index < toolbarModel_->size()) { 867 if (index < toolbarModel_->size()) {
866 const Extension* extension = toolbarModel_->GetExtensionByIndex(index); 868 const Extension* extension = toolbarModel_->GetExtensionByIndex(index);
867 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; 869 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())];
868 } 870 }
869 return nil; 871 return nil;
870 } 872 }
871 873
872 @end 874 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698