| OLD | NEW |
| 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/gtk/options/content_page_gtk.h" | 5 #include "chrome/browser/gtk/options/content_page_gtk.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/gtk_util.h" | 9 #include "app/gtk_util.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 } else { | 593 } else { |
| 594 sync_service_->ShowLoginDialog(NULL); | 594 sync_service_->ShowLoginDialog(NULL); |
| 595 ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS); | 595 ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS); |
| 596 } | 596 } |
| 597 } | 597 } |
| 598 | 598 |
| 599 void ContentPageGtk::OnSyncCustomizeButtonClicked(GtkWidget* widget) { | 599 void ContentPageGtk::OnSyncCustomizeButtonClicked(GtkWidget* widget) { |
| 600 // sync_customize_button_ should be invisible if sync is not yet set up. | 600 // sync_customize_button_ should be invisible if sync is not yet set up. |
| 601 DCHECK(sync_service_ && !sync_service_->IsManaged() && | 601 DCHECK(sync_service_ && !sync_service_->IsManaged() && |
| 602 sync_service_->HasSyncSetupCompleted()); | 602 sync_service_->HasSyncSetupCompleted()); |
| 603 sync_service_->ShowChooseDataTypes(NULL); | 603 sync_service_->ShowConfigure(NULL); |
| 604 } | 604 } |
| 605 | 605 |
| 606 void ContentPageGtk::OnSyncActionLinkClicked(GtkWidget* widget) { | 606 void ContentPageGtk::OnSyncActionLinkClicked(GtkWidget* widget) { |
| 607 DCHECK(sync_service_ && !sync_service_->IsManaged()); | 607 DCHECK(sync_service_ && !sync_service_->IsManaged()); |
| 608 sync_service_->ShowChooseDataTypes(NULL); | 608 sync_service_->ShowConfigure(NULL); |
| 609 } | 609 } |
| 610 | 610 |
| 611 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response) { | 611 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response) { |
| 612 if (response == GTK_RESPONSE_ACCEPT) { | 612 if (response == GTK_RESPONSE_ACCEPT) { |
| 613 sync_service_->DisableForUser(); | 613 sync_service_->DisableForUser(); |
| 614 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); | 614 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); |
| 615 } | 615 } |
| 616 gtk_widget_destroy(widget); | 616 gtk_widget_destroy(widget); |
| 617 } | 617 } |
| 618 | 618 |
| 619 void ContentPageGtk::OnPrivacyDashboardLinkClicked(GtkWidget* widget) { | 619 void ContentPageGtk::OnPrivacyDashboardLinkClicked(GtkWidget* widget) { |
| 620 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); | 620 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); |
| 621 } | 621 } |
| OLD | NEW |