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

Unified Diff: chrome/browser/profiles/profile_info_cache.cc

Issue 8921006: Standardize StringToInt{,64} interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix namespace issues. Created 9 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_info_cache.cc
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc
index 50affc6f08c77e65bfbae6ec0c62b16d2674269a..989d6eeeb417063277e75bc82928de0a159d7fcb 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -13,6 +13,7 @@
#include "base/rand_util.h"
#include "base/stl_util.h"
#include "base/string_number_conversions.h"
+#include "base/string_piece.h"
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
@@ -31,6 +32,7 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_util.h"
+using base::StringPiece;
erikwright (departed) 2011/12/14 19:09:58 Remove 'using' for consistency with cbentzel's com
using content::BrowserThread;
namespace {
@@ -677,8 +679,8 @@ bool ProfileInfoCache::IsDefaultAvatarIconUrl(const std::string& url,
return false;
int int_value = -1;
- if (base::StringToInt(url.begin() + strlen(kDefaultUrlPrefix),
- url.end(),
+ if (base::StringToInt(StringPiece(url.begin() + strlen(kDefaultUrlPrefix),
+ url.end()),
&int_value)) {
if (int_value < 0 ||
int_value >= static_cast<int>(kDefaultAvatarIconsCount))

Powered by Google App Engine
This is Rietveld 408576698