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

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

Issue 12767006: [Cleanup] Remove StringPrintf from global namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, once more Created 7 years, 9 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/string16.h" 9 #include "base/string16.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 void AutocompleteMatch::RecordAdditionalInfo(const std::string& property, 444 void AutocompleteMatch::RecordAdditionalInfo(const std::string& property,
445 const std::string& value) { 445 const std::string& value) {
446 DCHECK(property.size()); 446 DCHECK(property.size());
447 DCHECK(value.size()); 447 DCHECK(value.size());
448 additional_info[property] = value; 448 additional_info[property] = value;
449 } 449 }
450 450
451 void AutocompleteMatch::RecordAdditionalInfo(const std::string& property, 451 void AutocompleteMatch::RecordAdditionalInfo(const std::string& property,
452 int value) { 452 int value) {
453 RecordAdditionalInfo(property, StringPrintf("%d", value)); 453 RecordAdditionalInfo(property, base::StringPrintf("%d", value));
454 } 454 }
455 455
456 void AutocompleteMatch::RecordAdditionalInfo(const std::string& property, 456 void AutocompleteMatch::RecordAdditionalInfo(const std::string& property,
457 const base::Time& value) { 457 const base::Time& value) {
458 RecordAdditionalInfo(property, 458 RecordAdditionalInfo(property,
459 UTF16ToUTF8(base::TimeFormatShortDateAndTime(value))); 459 UTF16ToUTF8(base::TimeFormatShortDateAndTime(value)));
460 } 460 }
461 461
462 #ifndef NDEBUG 462 #ifndef NDEBUG
463 void AutocompleteMatch::Validate() const { 463 void AutocompleteMatch::Validate() const {
(...skipping 26 matching lines...) Expand all
490 << " is unsorted in relation to last offset of " << last_offset 490 << " is unsorted in relation to last offset of " << last_offset
491 << ". Provider: " << provider_name << "."; 491 << ". Provider: " << provider_name << ".";
492 DCHECK_LT(i->offset, text.length()) 492 DCHECK_LT(i->offset, text.length())
493 << " Classification of [" << i->offset << "," << text.length() 493 << " Classification of [" << i->offset << "," << text.length()
494 << "] is out of bounds for \"" << text << "\". Provider: " 494 << "] is out of bounds for \"" << text << "\". Provider: "
495 << provider_name << "."; 495 << provider_name << ".";
496 last_offset = i->offset; 496 last_offset = i->offset;
497 } 497 }
498 } 498 }
499 #endif 499 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698