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

Side by Side Diff: chrome/browser/ui/views/clear_browsing_data.cc

Issue 6192007: Remove wstring from views. Part 3: Switch accessibility strings to string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.h" 5 #include "chrome/browser/ui/views/clear_browsing_data.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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Add a label which appears before the combo box for the time period. 128 // Add a label which appears before the combo box for the time period.
129 time_period_label_ = new views::Label(UTF16ToWide( 129 time_period_label_ = new views::Label(UTF16ToWide(
130 l10n_util::GetStringUTF16(IDS_CLEAR_BROWSING_DATA_TIME_LABEL))); 130 l10n_util::GetStringUTF16(IDS_CLEAR_BROWSING_DATA_TIME_LABEL)));
131 AddChildView(time_period_label_); 131 AddChildView(time_period_label_);
132 132
133 // Add the combo box showing how far back in time we want to delete. 133 // Add the combo box showing how far back in time we want to delete.
134 time_period_combobox_ = new views::Combobox(this); 134 time_period_combobox_ = new views::Combobox(this);
135 time_period_combobox_->SetSelectedItem(profile_->GetPrefs()->GetInteger( 135 time_period_combobox_->SetSelectedItem(profile_->GetPrefs()->GetInteger(
136 prefs::kDeleteTimePeriod)); 136 prefs::kDeleteTimePeriod));
137 time_period_combobox_->set_listener(this); 137 time_period_combobox_->set_listener(this);
138 time_period_combobox_->SetAccessibleName(time_period_label_->GetText()); 138 time_period_combobox_->SetAccessibleName(
139 WideToUTF16Hack(time_period_label_->GetText()));
139 AddChildView(time_period_combobox_); 140 AddChildView(time_period_combobox_);
140 141
141 // Create the throbber and related views. The throbber and status link are 142 // Create the throbber and related views. The throbber and status link are
142 // contained in throbber_view_, which is positioned by DialogClientView right 143 // contained in throbber_view_, which is positioned by DialogClientView right
143 // next to the buttons. 144 // next to the buttons.
144 throbber_view_ = new views::View(); 145 throbber_view_ = new views::View();
145 146
146 GridLayout* layout = new GridLayout(throbber_view_); 147 GridLayout* layout = new GridLayout(throbber_view_);
147 throbber_view_->SetLayoutManager(layout); 148 throbber_view_->SetLayoutManager(layout);
148 views::ColumnSet* column_set = layout->AddColumnSet(0); 149 views::ColumnSet* column_set = layout->AddColumnSet(0);
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 remover_->AddObserver(this); 467 remover_->AddObserver(this);
467 remover_->Remove(remove_mask); 468 remover_->Remove(remove_mask);
468 } 469 }
469 470
470 void ClearBrowsingDataView::OnBrowsingDataRemoverDone() { 471 void ClearBrowsingDataView::OnBrowsingDataRemoverDone() {
471 // No need to remove ourselves as an observer as BrowsingDataRemover deletes 472 // No need to remove ourselves as an observer as BrowsingDataRemover deletes
472 // itself after we return. 473 // itself after we return.
473 remover_ = NULL; 474 remover_ = NULL;
474 window()->Close(); 475 window()->Close();
475 } 476 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | chrome/browser/ui/views/clear_browsing_data_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698