Index: chrome/common/extensions/extension_unittest.cc |
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc |
index 6e1ad5e95cc543296379952954ff4680c2d76867..702bb558811515c461d431717eb3cc4a0464850f 100644 |
--- a/chrome/common/extensions/extension_unittest.cc |
+++ b/chrome/common/extensions/extension_unittest.cc |
@@ -2,12 +2,14 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "chrome/common/extensions/extension.h" |
+ |
+#include "base/format_macros.h" |
#include "base/file_path.h" |
#include "base/file_util.h" |
#include "base/string_util.h" |
#include "base/path_service.h" |
#include "chrome/common/chrome_paths.h" |
-#include "chrome/common/extensions/extension.h" |
#include "chrome/common/extensions/extension_constants.h" |
#include "chrome/common/extensions/extension_error_reporter.h" |
#include "chrome/common/json_value_serializer.h" |
@@ -461,9 +463,11 @@ TEST(ExtensionTest, UpdateUrls) { |
DictionaryValue input_value; |
#if defined(OS_WIN) |
- FilePath path(StringPrintf(L"c:\\extension%i", i)); |
+ // (Why %d below? This is the single place in the whole code base that |
+ // might make use of a WidePRIuS; let's not encourage any more.) |
Mark Mentovai
2009/11/18 20:55:27
OK, that's fair enough. But wouldn't it be L"%Iu"
|
+ FilePath path(StringPrintf(L"c:\\extension%d", i)); |
#else |
- FilePath path(StringPrintf("/extension%i", i)); |
+ FilePath path(StringPrintf("/extension%" PRIuS, i)); |
#endif |
Extension extension(path); |
std::string error; |
@@ -483,9 +487,12 @@ TEST(ExtensionTest, UpdateUrls) { |
for (size_t i = 0; i < invalid.size(); i++) { |
DictionaryValue input_value; |
#if defined(OS_WIN) |
- FilePath path(StringPrintf(L"c:\\extension%i", i)); |
+ // We should use PRIuS here, but it's a wide string. This is the only |
+ // instance of a wide string needing PRIuS in the entire code base, so |
+ // let's just work around it here. |
Mark Mentovai
2009/11/18 20:55:27
Same.
Oh, I guess there are two locations...
|
+ FilePath path(StringPrintf(L"c:\\extension%d", i)); |
#else |
- FilePath path(StringPrintf("/extension%i", i)); |
+ FilePath path(StringPrintf("/extension%" PRIuS, i)); |
#endif |
Extension extension(path); |
std::string error; |