| 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_browsing_data_view.h" | 5 #include "chrome/browser/ui/views/clear_browsing_data_view.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.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" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 // Add a label which appears before the combo box for the time period. | 122 // Add a label which appears before the combo box for the time period. |
| 123 time_period_label_ = new views::Label(UTF16ToWide( | 123 time_period_label_ = new views::Label(UTF16ToWide( |
| 124 l10n_util::GetStringUTF16(IDS_CLEAR_BROWSING_DATA_TIME_LABEL))); | 124 l10n_util::GetStringUTF16(IDS_CLEAR_BROWSING_DATA_TIME_LABEL))); |
| 125 | 125 |
| 126 // Add the combo box showing how far back in time we want to delete. | 126 // Add the combo box showing how far back in time we want to delete. |
| 127 time_period_combobox_ = new views::Combobox(this); | 127 time_period_combobox_ = new views::Combobox(this); |
| 128 time_period_combobox_->SetSelectedItem(profile_->GetPrefs()->GetInteger( | 128 time_period_combobox_->SetSelectedItem(profile_->GetPrefs()->GetInteger( |
| 129 prefs::kDeleteTimePeriod)); | 129 prefs::kDeleteTimePeriod)); |
| 130 time_period_combobox_->set_listener(this); | 130 time_period_combobox_->set_listener(this); |
| 131 time_period_combobox_->SetAccessibleName(time_period_label_->GetText()); | 131 time_period_combobox_->SetAccessibleName( |
| 132 WideToUTF16Hack(time_period_label_->GetText())); |
| 132 | 133 |
| 133 // Create the throbber and related views. The throbber and status link are | 134 // Create the throbber and related views. The throbber and status link are |
| 134 // contained in throbber_view_, which is positioned by DialogClientView right | 135 // contained in throbber_view_, which is positioned by DialogClientView right |
| 135 // next to the buttons. | 136 // next to the buttons. |
| 136 throbber_view_ = new views::View(); | 137 throbber_view_ = new views::View(); |
| 137 | 138 |
| 138 GridLayout* layout = new GridLayout(throbber_view_); | 139 GridLayout* layout = new GridLayout(throbber_view_); |
| 139 throbber_view_->SetLayoutManager(layout); | 140 throbber_view_->SetLayoutManager(layout); |
| 140 views::ColumnSet* column_set = layout->AddColumnSet(0); | 141 views::ColumnSet* column_set = layout->AddColumnSet(0); |
| 141 | 142 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 remover_ = new BrowsingDataRemover(profile_, | 364 remover_ = new BrowsingDataRemover(profile_, |
| 364 static_cast<BrowsingDataRemover::TimePeriod>(period_selected), | 365 static_cast<BrowsingDataRemover::TimePeriod>(period_selected), |
| 365 base::Time()); | 366 base::Time()); |
| 366 remover_->AddObserver(this); | 367 remover_->AddObserver(this); |
| 367 remover_->Remove(remove_mask); | 368 remover_->Remove(remove_mask); |
| 368 } | 369 } |
| 369 | 370 |
| 370 void ClearBrowsingDataView2::OnBrowsingDataRemoverDone() { | 371 void ClearBrowsingDataView2::OnBrowsingDataRemoverDone() { |
| 371 clear_data_parent_window_->StopClearingBrowsingData(); | 372 clear_data_parent_window_->StopClearingBrowsingData(); |
| 372 } | 373 } |
| OLD | NEW |