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

Unified Diff: chrome/browser/views/options/content_page_view.cc

Issue 337034: Remove the browser_sync flag. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/views/options/content_page_view.h ('k') | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/options/content_page_view.cc
===================================================================
--- chrome/browser/views/options/content_page_view.cc (revision 30247)
+++ chrome/browser/views/options/content_page_view.cc (working copy)
@@ -36,14 +36,13 @@
const int kPasswordSavingRadioGroup = 1;
const int kFormAutofillRadioGroup = 2;
-#if defined(BROWSER_SYNC)
// Background color for the status label when it's showing an error.
static const SkColor kSyncLabelErrorBgColor = SkColorSetRGB(0xff, 0x9a, 0x9a);
static views::Background* CreateErrorBackground() {
return views::Background::CreateSolidBackground(kSyncLabelErrorBgColor);
}
-#endif
+
} // namespace
ContentPageView::ContentPageView(Profile* profile)
@@ -60,27 +59,21 @@
browsing_data_group_(NULL),
import_button_(NULL),
clear_data_button_(NULL),
-#if defined(BROWSER_SYNC)
sync_group_(NULL),
sync_status_label_(NULL),
sync_action_link_(NULL),
sync_start_stop_button_(NULL),
sync_service_(NULL),
-#endif
OptionsPageView(profile) {
-#if defined(BROWSER_SYNC)
if (profile->GetProfileSyncService()) {
sync_service_ = profile->GetProfileSyncService();
sync_service_->AddObserver(this);
-#endif
}
}
ContentPageView::~ContentPageView() {
-#if defined(BROWSER_SYNC)
if (sync_service_)
sync_service_->RemoveObserver(this);
-#endif
}
///////////////////////////////////////////////////////////////////////////////
@@ -126,7 +119,6 @@
GetWindow()->GetNativeWindow(),
gfx::Rect(),
new ClearBrowsingDataView(profile()))->Show();
-#if defined(BROWSER_SYNC)
} else if (sender == sync_start_stop_button_) {
DCHECK(sync_service_);
@@ -146,7 +138,6 @@
sync_service_->EnableForUser();
ProfileSyncService::SyncEvent(ProfileSyncService::START_FROM_OPTIONS);
}
-#endif
}
}
@@ -159,11 +150,9 @@
browser->window()->Activate();
return;
}
-#if defined(BROWSER_SYNC)
DCHECK_EQ(source, sync_action_link_);
DCHECK(sync_service_);
sync_service_->ShowLoginDialog();
-#endif
}
////////////////////////////////////////////////////////////////////////////////
@@ -182,14 +171,12 @@
column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
GridLayout::USE_PREF, 0, 0);
-#if defined(BROWSER_SYNC)
if (sync_service_) {
layout->StartRow(0, single_column_view_set_id);
InitSyncGroup();
layout->AddView(sync_group_);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
}
-#endif
layout->StartRow(0, single_column_view_set_id);
InitPasswordSavingGroup();
@@ -245,10 +232,8 @@
// ContentsPageView, views::View overrides:
void ContentPageView::Layout() {
-#if defined(BROWSER_SYNC)
if (is_initialized())
UpdateSyncControls();
-#endif
// We need to Layout twice - once to get the width of the contents box...
View::Layout();
passwords_asktosave_radio_->SetBounds(
@@ -257,12 +242,10 @@
0, 0, passwords_group_->GetContentsWidth(), 0);
browsing_data_label_->SetBounds(
0, 0, browsing_data_group_->GetContentsWidth(), 0);
-#if defined(BROWSER_SYNC)
if (is_initialized()) {
sync_status_label_->SetBounds(
0, 0, sync_group_->GetContentsWidth(), 0);
}
-#endif
// ... and twice to get the height of multi-line items correct.
View::Layout();
}
@@ -270,7 +253,7 @@
///////////////////////////////////////////////////////////////////////////////
// ContentsPageView, ProfileSyncServiceObserver implementation:
-#if defined(BROWSER_SYNC)
+
void ContentPageView::OnStateChanged() {
// If the UI controls are not yet initialized, then don't do anything. This
// can happen if the Options dialog is up, but the Content tab is not yet
@@ -278,7 +261,6 @@
if (is_initialized())
Layout();
}
-#endif
///////////////////////////////////////////////////////////////////////////////
// ContentPageView, private:
@@ -439,7 +421,6 @@
ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS);
}
-#if defined(BROWSER_SYNC)
void ContentPageView::InitSyncGroup() {
sync_status_label_ = new views::Label;
sync_status_label_->SetMultiLine(true);
@@ -503,5 +484,3 @@
sync_action_link_->set_background(NULL);
}
}
-
-#endif // defined(BROWSER_SYNC)
« no previous file with comments | « chrome/browser/views/options/content_page_view.h ('k') | chrome/browser/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698