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

Unified Diff: chrome/browser/sync/test/integration/extensions_helper.cc

Issue 8921006: Standardize StringToInt{,64} interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix more bugs in interfaces of tests. 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
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/extensions_helper.cc
diff --git a/chrome/browser/sync/test/integration/extensions_helper.cc b/chrome/browser/sync/test/integration/extensions_helper.cc
index 6358e88988b9c3a756860c6dda64aa3fb58b0d7e..1d0917f6c703bf75b427991b5bb61a207f718ebe 100644
--- a/chrome/browser/sync/test/integration/extensions_helper.cc
+++ b/chrome/browser/sync/test/integration/extensions_helper.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/string_number_conversions.h"
+#include "base/string_piece.h"
#include "base/string_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
@@ -114,7 +115,8 @@ std::string CreateFakeExtensionName(int index) {
bool ExtensionNameToIndex(const std::string& name, int* index) {
if (!StartsWithASCII(name, extension_name_prefix, true) ||
- !base::StringToInt(name.substr(strlen(extension_name_prefix)), index)) {
+ !base::StringToInt(base::StringPiece(name, strlen(extension_name_prefix)),
erikwright (departed) 2011/12/16 21:05:50 Are you sure this works? Looks like it needs to be
+ index)) {
LOG(WARNING) << "Unable to convert extension name \"" << name
<< "\" to index";
return false;
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698