| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/clear_server_data.h" | 5 #include "chrome/browser/ui/views/clear_server_data.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/search_engines/template_url_model.h" | 12 #include "chrome/browser/search_engines/template_url_model.h" |
| 13 #include "chrome/browser/sync/profile_sync_service.h" | 13 #include "chrome/browser/sync/profile_sync_service.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "gfx/insets.h" | 16 #include "gfx/insets.h" |
| 17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
| 18 #include "grit/locale_settings.h" | 18 #include "grit/locale_settings.h" |
| 19 #include "net/url_request/url_request_context.h" | 19 #include "net/url_request/url_request_context.h" |
| 20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
| 21 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
| 22 #include "views/background.h" | 22 #include "views/background.h" |
| 23 #include "views/controls/button/checkbox.h" | 23 #include "views/controls/button/checkbox.h" |
| 24 #include "views/controls/label.h" | 24 #include "views/controls/label.h" |
| 25 #include "views/controls/separator.h" | 25 #include "views/controls/separator.h" |
| 26 #include "views/controls/throbber.h" | 26 #include "views/controls/throbber.h" |
| 27 #include "views/grid_layout.h" | 27 #include "views/grid_layout.h" |
| 28 #include "views/standard_layout.h" | 28 #include "views/layout/layout_constants.h" |
| 29 #include "views/widget/widget.h" | 29 #include "views/widget/widget.h" |
| 30 #include "views/window/dialog_client_view.h" | 30 #include "views/window/dialog_client_view.h" |
| 31 #include "views/window/window.h" | 31 #include "views/window/window.h" |
| 32 | 32 |
| 33 using views::GridLayout; | 33 using views::GridLayout; |
| 34 using views::ColumnSet; | 34 using views::ColumnSet; |
| 35 | 35 |
| 36 // The combo box is vertically aligned to the 'time-period' label, which makes | 36 // The combo box is vertically aligned to the 'time-period' label, which makes |
| 37 // the combo box look a little too close to the check box above it when we use | 37 // the combo box look a little too close to the check box above it when we use |
| 38 // standard layout to separate them. We therefore add a little extra margin to | 38 // standard layout to separate them. We therefore add a little extra margin to |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 throbber_->Stop(); | 335 throbber_->Stop(); |
| 336 } | 336 } |
| 337 | 337 |
| 338 void ClearServerDataView::UpdateClearButtonEnabledState( | 338 void ClearServerDataView::UpdateClearButtonEnabledState( |
| 339 bool delete_in_progress) { | 339 bool delete_in_progress) { |
| 340 this->clear_server_data_button_->SetEnabled( | 340 this->clear_server_data_button_->SetEnabled( |
| 341 sync_service_ != NULL && | 341 sync_service_ != NULL && |
| 342 sync_service_->HasSyncSetupCompleted() && | 342 sync_service_->HasSyncSetupCompleted() && |
| 343 !delete_in_progress && allow_clear_); | 343 !delete_in_progress && allow_clear_); |
| 344 } | 344 } |
| OLD | NEW |