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

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: Really fix. And rebase 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm » ('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) 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 return NO; 410 return NO;
411 } else if (effect == NSViewAnimationFadeOutEffect) { 411 } else if (effect == NSViewAnimationFadeOutEffect) {
412 return YES; 412 return YES;
413 } 413 }
414 414
415 NOTREACHED(); 415 NOTREACHED();
416 return YES; 416 return YES;
417 } 417 }
418 418
419 + (void)registerUserPrefs:(PrefService*)prefs { 419 + (void)registerUserPrefs:(PrefService*)prefs {
420 prefs->RegisterDoublePref(prefs::kBrowserActionContainerWidth, 0); 420 prefs->RegisterDoublePref(prefs::kBrowserActionContainerWidth,
421 0,
422 PrefService::UNSYNCABLE_PREF);
421 } 423 }
422 424
423 #pragma mark - 425 #pragma mark -
424 #pragma mark Private Methods 426 #pragma mark Private Methods
425 427
426 - (void)createButtons { 428 - (void)createButtons {
427 if (!toolbarModel_) 429 if (!toolbarModel_)
428 return; 430 return;
429 431
430 NSUInteger i = 0; 432 NSUInteger i = 0;
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 if (profile_->IsOffTheRecord()) 857 if (profile_->IsOffTheRecord())
856 index = toolbarModel_->IncognitoIndexToOriginal(index); 858 index = toolbarModel_->IncognitoIndexToOriginal(index);
857 if (index < toolbarModel_->size()) { 859 if (index < toolbarModel_->size()) {
858 const Extension* extension = toolbarModel_->GetExtensionByIndex(index); 860 const Extension* extension = toolbarModel_->GetExtensionByIndex(index);
859 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; 861 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())];
860 } 862 }
861 return nil; 863 return nil;
862 } 864 }
863 865
864 @end 866 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698