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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_main_container.mm

Issue 25405003: [rAC, OSX] saveInChrome status now persistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more space. Created 7 years, 3 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 | « chrome/browser/ui/cocoa/autofill/autofill_main_container.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
index 2dce2d0c99cc8e2bc61a3cde87a0c56ee27e6585..007d29bb6f0fe08ccd4af9ac7f44d47fb5e2267f 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_main_container.mm
@@ -55,7 +55,8 @@
[saveInChromeCheckbox_ setButtonType:NSSwitchButton];
[saveInChromeCheckbox_ setTitle:
base::SysUTF16ToNSString(delegate_->SaveLocallyText())];
- [saveInChromeCheckbox_ setState:NSOnState];
+ [saveInChromeCheckbox_ setState:
+ (delegate_->ShouldSaveInChrome() ? NSOnState : NSOffState)];
[saveInChromeCheckbox_ sizeToFit];
[[self view] addSubview:saveInChromeCheckbox_];
@@ -231,7 +232,7 @@
}
- (void)modelChanged {
- [saveInChromeCheckbox_ setHidden:!delegate_->ShouldOfferToSaveInChrome()];
+ [self updateSaveInChrome];
[detailsContainer_ modelChanged];
}
@@ -281,6 +282,10 @@
return [detailsContainer_ validate];
}
+- (void)updateSaveInChrome {
+ [saveInChromeCheckbox_ setHidden:!delegate_->ShouldOfferToSaveInChrome()];
+}
+
@end
« no previous file with comments | « chrome/browser/ui/cocoa/autofill/autofill_main_container.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698