summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-15 01:19:11 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-15 01:19:11 +0000
commit48352c11fe849f7f786c43bdfe293dc2c58d12c5 (patch)
tree57708d7e211d7cbcf2b81b1395740f5859a62aa1 /chrome/browser/views/options
parent20cc723d102acb16b61789714bbf443ba3d7d1f5 (diff)
downloadchromium_src-48352c11fe849f7f786c43bdfe293dc2c58d12c5.zip
chromium_src-48352c11fe849f7f786c43bdfe293dc2c58d12c5.tar.gz
chromium_src-48352c11fe849f7f786c43bdfe293dc2c58d12c5.tar.bz2
Some personalization cleanup:
- Removes ProfilePersonalization (which is why the CL appears huge) - Makes Profile do the work ProfilePersonalization did for creating PSS - cloudy:stats > about:sync - Removes the cloudy:// scheme and uses chrome:// for resources. (Note SyncResourcesSource is a straight copy of CloudyResourceSource). - Moves prefs and switches to pref_names and chrome_switches. BUG=none TEST=ProfileSyncServiceTest, LiveBookmarkSyncTests, SyncSetupWizardTest Review URL: http://codereview.chromium.org/164544 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/options')
-rw-r--r--chrome/browser/views/options/content_page_view.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index af2a4df..4a1c932 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -69,13 +69,11 @@ ContentPageView::ContentPageView(Profile* profile)
#endif
OptionsPageView(profile) {
#ifdef CHROME_PERSONALIZATION
- ProfilePersonalization* profile_p13n = profile->GetProfilePersonalization();
- if (profile_p13n) {
- sync_service_ = profile_p13n->sync_service();
- DCHECK(sync_service_);
+ if (profile->GetProfileSyncService()) {
+ sync_service_ = profile->GetProfileSyncService();
sync_service_->AddObserver(this);
- }
#endif
+ }
}
ContentPageView::~ContentPageView() {
@@ -135,7 +133,7 @@ void ContentPageView::ButtonPressed(views::Button* sender) {
#ifdef CHROME_PERSONALIZATION
} else if (sender == sync_start_stop_button_) {
DCHECK(sync_service_);
- if (sync_service_->IsSyncEnabledByUser()) {
+ if (sync_service_->HasSyncSetupCompleted()) {
sync_service_->DisableForUser();
ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
} else {
@@ -457,10 +455,10 @@ void ContentPageView::UpdateSyncControls() {
std::wstring status_label;
std::wstring link_label;
std::wstring button_label;
- bool sync_enabled = sync_service_->IsSyncEnabledByUser();
+ bool sync_setup_completed = sync_service_->HasSyncSetupCompleted();
bool status_has_error = SyncStatusUIHelper::GetLabels(sync_service_,
&status_label, &link_label) == SyncStatusUIHelper::SYNC_ERROR;
- button_label = sync_enabled ? kStopSyncButtonLabel :
+ button_label = sync_setup_completed ? kStopSyncButtonLabel :
sync_service_->SetupInProgress() ? UTF8ToWide(kSettingUpText)
: kStartSyncButtonLabel;