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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_match.cc

Issue 109013006: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 12 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/autocomplete/autocomplete_match.h" 5 #include "chrome/browser/autocomplete/autocomplete_match.h"
6 6
7 #include "base/i18n/time_formatting.h" 7 #include "base/i18n/time_formatting.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 } 432 }
433 433
434 void AutocompleteMatch::RecordAdditionalInfo(const std::string& property, 434 void AutocompleteMatch::RecordAdditionalInfo(const std::string& property,
435 int value) { 435 int value) {
436 RecordAdditionalInfo(property, base::IntToString(value)); 436 RecordAdditionalInfo(property, base::IntToString(value));
437 } 437 }
438 438
439 void AutocompleteMatch::RecordAdditionalInfo(const std::string& property, 439 void AutocompleteMatch::RecordAdditionalInfo(const std::string& property,
440 const base::Time& value) { 440 const base::Time& value) {
441 RecordAdditionalInfo(property, 441 RecordAdditionalInfo(property,
442 UTF16ToUTF8(base::TimeFormatShortDateAndTime(value))); 442 base::UTF16ToUTF8(
443 base::TimeFormatShortDateAndTime(value)));
443 } 444 }
444 445
445 std::string AutocompleteMatch::GetAdditionalInfo( 446 std::string AutocompleteMatch::GetAdditionalInfo(
446 const std::string& property) const { 447 const std::string& property) const {
447 AdditionalInfo::const_iterator i(additional_info.find(property)); 448 AdditionalInfo::const_iterator i(additional_info.find(property));
448 return (i == additional_info.end()) ? std::string() : i->second; 449 return (i == additional_info.end()) ? std::string() : i->second;
449 } 450 }
450 451
451 bool AutocompleteMatch::IsVerbatimType() const { 452 bool AutocompleteMatch::IsVerbatimType() const {
452 const bool is_keyword_verbatim_match = 453 const bool is_keyword_verbatim_match =
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 << " is unsorted in relation to last offset of " << last_offset 490 << " is unsorted in relation to last offset of " << last_offset
490 << ". Provider: " << provider_name << "."; 491 << ". Provider: " << provider_name << ".";
491 DCHECK_LT(i->offset, text.length()) 492 DCHECK_LT(i->offset, text.length())
492 << " Classification of [" << i->offset << "," << text.length() 493 << " Classification of [" << i->offset << "," << text.length()
493 << "] is out of bounds for \"" << text << "\". Provider: " 494 << "] is out of bounds for \"" << text << "\". Provider: "
494 << provider_name << "."; 495 << provider_name << ".";
495 last_offset = i->offset; 496 last_offset = i->offset;
496 } 497 }
497 } 498 }
498 #endif 499 #endif
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_input_unittest.cc ('k') | chrome/browser/autocomplete/autocomplete_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698