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

Side by Side Diff: ui/base/text/text_elider.cc

Issue 7216031: Coverity: Initialize member variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove trace_event.h changes. Created 9 years, 6 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 | « base/process_util.cc ('k') | no next file » | 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) 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 <vector> 5 #include <vector>
6 6
7 #include "ui/base/text/text_elider.h" 7 #include "ui/base/text/text_elider.h"
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/i18n/break_iterator.h" 10 #include "base/i18n/break_iterator.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 url_parse::Parsed parsed; 393 url_parse::Parsed parsed;
394 display_url_ = net::FormatUrl(url, languages, 394 display_url_ = net::FormatUrl(url, languages,
395 net::kFormatUrlOmitAll, UnescapeRule::SPACES, &parsed, &prefix_end_, 395 net::kFormatUrlOmitAll, UnescapeRule::SPACES, &parsed, &prefix_end_,
396 NULL); 396 NULL);
397 if (sort_host_.length() > host_minus_www.length()) { 397 if (sort_host_.length() > host_minus_www.length()) {
398 prefix_end_ += sort_host_.length() - host_minus_www.length(); 398 prefix_end_ += sort_host_.length() - host_minus_www.length();
399 sort_host_.swap(host_minus_www); 399 sort_host_.swap(host_minus_www);
400 } 400 }
401 } 401 }
402 402
403 SortedDisplayURL::SortedDisplayURL() { 403 SortedDisplayURL::SortedDisplayURL() : prefix_end_(0) {
404 } 404 }
405 405
406 SortedDisplayURL::~SortedDisplayURL() { 406 SortedDisplayURL::~SortedDisplayURL() {
407 } 407 }
408 408
409 int SortedDisplayURL::Compare(const SortedDisplayURL& other, 409 int SortedDisplayURL::Compare(const SortedDisplayURL& other,
410 icu::Collator* collator) const { 410 icu::Collator* collator) const {
411 // Compare on hosts first. The host won't contain 'www.'. 411 // Compare on hosts first. The host won't contain 'www.'.
412 UErrorCode compare_status = U_ZERO_ERROR; 412 UErrorCode compare_status = U_ZERO_ERROR;
413 UCollationResult host_compare_result = collator->compare( 413 UCollationResult host_compare_result = collator->compare(
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 661
662 bool ElideRectangleString(const string16& input, size_t max_rows, 662 bool ElideRectangleString(const string16& input, size_t max_rows,
663 size_t max_cols, bool strict, string16* output) { 663 size_t max_cols, bool strict, string16* output) {
664 RectangleString rect(max_rows, max_cols, strict, output); 664 RectangleString rect(max_rows, max_cols, strict, output);
665 rect.Init(); 665 rect.Init();
666 rect.AddString(input); 666 rect.AddString(input);
667 return rect.Finalize(); 667 return rect.Finalize();
668 } 668 }
669 669
670 } // namespace ui 670 } // namespace ui
OLDNEW
« no previous file with comments | « base/process_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698