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

Side by Side Diff: chrome/browser/task_manager.cc

Issue 171012: Use 'icu::' namespace explicitly (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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
« no previous file with comments | « chrome/browser/spellcheck_worditerator.cc ('k') | chrome/common/time_format.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/task_manager.h" 5 #include "chrome/browser/task_manager.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 DCHECK(iter != resources_.end()); 195 DCHECK(iter != resources_.end());
196 return std::make_pair(iter - resources_.begin(), group->size()); 196 return std::make_pair(iter - resources_.begin(), group->size());
197 } 197 }
198 } 198 }
199 199
200 int TaskManagerModel::CompareValues(int row1, int row2, int col_id) const { 200 int TaskManagerModel::CompareValues(int row1, int row2, int col_id) const {
201 DCHECK(row1 < ResourceCount() && row2 < ResourceCount()); 201 DCHECK(row1 < ResourceCount() && row2 < ResourceCount());
202 switch (col_id) { 202 switch (col_id) {
203 case IDS_TASK_MANAGER_PAGE_COLUMN: { 203 case IDS_TASK_MANAGER_PAGE_COLUMN: {
204 // Let's do the default, string compare on the resource title. 204 // Let's do the default, string compare on the resource title.
205 static Collator* collator = NULL; 205 static icu::Collator* collator = NULL;
206 if (!collator) { 206 if (!collator) {
207 UErrorCode create_status = U_ZERO_ERROR; 207 UErrorCode create_status = U_ZERO_ERROR;
208 collator = Collator::createInstance(create_status); 208 collator = icu::Collator::createInstance(create_status);
209 if (!U_SUCCESS(create_status)) { 209 if (!U_SUCCESS(create_status)) {
210 collator = NULL; 210 collator = NULL;
211 NOTREACHED(); 211 NOTREACHED();
212 } 212 }
213 } 213 }
214 string16 title1 = WideToUTF16(GetResourceTitle(row1)); 214 string16 title1 = WideToUTF16(GetResourceTitle(row1));
215 string16 title2 = WideToUTF16(GetResourceTitle(row2)); 215 string16 title2 = WideToUTF16(GetResourceTitle(row2));
216 UErrorCode compare_status = U_ZERO_ERROR; 216 UErrorCode compare_status = U_ZERO_ERROR;
217 UCollationResult compare_result = collator->compare( 217 UCollationResult compare_result = collator->compare(
218 static_cast<const UChar*>(title1.c_str()), 218 static_cast<const UChar*>(title1.c_str()),
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 752
753 void TaskManager::OnWindowClosed() { 753 void TaskManager::OnWindowClosed() {
754 model_->StopUpdating(); 754 model_->StopUpdating();
755 model_->Clear(); 755 model_->Clear();
756 } 756 }
757 757
758 // static 758 // static
759 TaskManager* TaskManager::GetInstance() { 759 TaskManager* TaskManager::GetInstance() {
760 return Singleton<TaskManager>::get(); 760 return Singleton<TaskManager>::get();
761 } 761 }
OLDNEW
« no previous file with comments | « chrome/browser/spellcheck_worditerator.cc ('k') | chrome/common/time_format.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698