Chromium Code Reviews| 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; |