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

Side by Side Diff: chrome/browser/views/options/content_page_view.cc

Issue 668171: AutoFill Mac preference for enabling Address Book "me" card usage.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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/views/autofill_profiles_view_win.cc ('k') | chrome/common/pref_names.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/views/options/content_page_view.h" 5 #include "chrome/browser/views/options/content_page_view.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <vsstyle.h> 9 #include <vsstyle.h>
10 #include <vssym32.h> 10 #include <vssym32.h>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 UserMetricsRecordAction("Options_ShowPasswordsExceptions", NULL); 111 UserMetricsRecordAction("Options_ShowPasswordsExceptions", NULL);
112 PasswordsExceptionsWindowView::Show(profile()); 112 PasswordsExceptionsWindowView::Show(profile());
113 } else if (sender == change_autofill_settings_button_) { 113 } else if (sender == change_autofill_settings_button_) {
114 // This button should be disabled if we lack PersonalDataManager. 114 // This button should be disabled if we lack PersonalDataManager.
115 DCHECK(profile()->GetPersonalDataManager()); 115 DCHECK(profile()->GetPersonalDataManager());
116 if (!profile()->GetPersonalDataManager()->IsDataLoaded()) { 116 if (!profile()->GetPersonalDataManager()->IsDataLoaded()) {
117 profile()->GetPersonalDataManager()->SetObserver(this); 117 profile()->GetPersonalDataManager()->SetObserver(this);
118 } else { 118 } else {
119 ShowAutoFillDialog(profile()->GetPersonalDataManager(), 119 ShowAutoFillDialog(profile()->GetPersonalDataManager(),
120 profile()->GetPersonalDataManager()->profiles(), 120 profile()->GetPersonalDataManager()->profiles(),
121 profile()->GetPersonalDataManager()->credit_cards()); 121 profile()->GetPersonalDataManager()->credit_cards(),
122 profile());
122 } 123 }
123 } else if (sender == themes_reset_button_) { 124 } else if (sender == themes_reset_button_) {
124 UserMetricsRecordAction("Options_ThemesReset", profile()->GetPrefs()); 125 UserMetricsRecordAction("Options_ThemesReset", profile()->GetPrefs());
125 profile()->ClearTheme(); 126 profile()->ClearTheme();
126 } else if (sender == import_button_) { 127 } else if (sender == import_button_) {
127 views::Window::CreateChromeWindow( 128 views::Window::CreateChromeWindow(
128 GetWindow()->GetNativeWindow(), 129 GetWindow()->GetNativeWindow(),
129 gfx::Rect(), 130 gfx::Rect(),
130 new ImporterView(profile(), ALL))->Show(); 131 new ImporterView(profile(), ALL))->Show();
131 } else if (sender == sync_start_stop_button_) { 132 } else if (sender == sync_start_stop_button_) {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 414 }
414 415
415 void ContentPageView::OnConfirmMessageAccept() { 416 void ContentPageView::OnConfirmMessageAccept() {
416 sync_service_->DisableForUser(); 417 sync_service_->DisableForUser();
417 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); 418 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
418 } 419 }
419 420
420 void ContentPageView::OnPersonalDataLoaded() { 421 void ContentPageView::OnPersonalDataLoaded() {
421 ShowAutoFillDialog(profile()->GetPersonalDataManager(), 422 ShowAutoFillDialog(profile()->GetPersonalDataManager(),
422 profile()->GetPersonalDataManager()->profiles(), 423 profile()->GetPersonalDataManager()->profiles(),
423 profile()->GetPersonalDataManager()->credit_cards()); 424 profile()->GetPersonalDataManager()->credit_cards(),
425 profile());
424 profile()->GetPersonalDataManager()->RemoveObserver(this); 426 profile()->GetPersonalDataManager()->RemoveObserver(this);
425 } 427 }
426 428
427 void ContentPageView::InitSyncGroup() { 429 void ContentPageView::InitSyncGroup() {
428 sync_status_label_ = new views::Label; 430 sync_status_label_ = new views::Label;
429 sync_status_label_->SetMultiLine(true); 431 sync_status_label_->SetMultiLine(true);
430 sync_status_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 432 sync_status_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
431 433
432 sync_action_link_ = new views::Link(); 434 sync_action_link_ = new views::Link();
433 sync_action_link_->set_collapse_when_hidden(true); 435 sync_action_link_->set_collapse_when_hidden(true);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 sync_action_link_->SetText(link_label); 482 sync_action_link_->SetText(link_label);
481 sync_action_link_->SetVisible(!link_label.empty()); 483 sync_action_link_->SetVisible(!link_label.empty());
482 if (status_has_error) { 484 if (status_has_error) {
483 sync_status_label_->set_background(CreateErrorBackground()); 485 sync_status_label_->set_background(CreateErrorBackground());
484 sync_action_link_->set_background(CreateErrorBackground()); 486 sync_action_link_->set_background(CreateErrorBackground());
485 } else { 487 } else {
486 sync_status_label_->set_background(NULL); 488 sync_status_label_->set_background(NULL);
487 sync_action_link_->set_background(NULL); 489 sync_action_link_->set_background(NULL);
488 } 490 }
489 } 491 }
OLDNEW
« no previous file with comments | « chrome/browser/views/autofill_profiles_view_win.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698