Index: content/browser/cache_storage/cache_storage_manager_unittest.cc |
diff --git a/content/browser/cache_storage/cache_storage_manager_unittest.cc b/content/browser/cache_storage/cache_storage_manager_unittest.cc |
index 5ed18f1cfdd2db9ac3d6c55acd43175e248254ad..0c982ddf6f7d4f465990ac9d639504bdbc510dde 100644 |
--- a/content/browser/cache_storage/cache_storage_manager_unittest.cc |
+++ b/content/browser/cache_storage/cache_storage_manager_unittest.cc |
@@ -17,6 +17,7 @@ |
#include "base/sha1.h" |
#include "base/stl_util.h" |
#include "base/strings/string_number_conversions.h" |
+#include "base/strings/utf_string_conversions.h" |
#include "base/thread_task_runner_handle.h" |
#include "content/browser/cache_storage/cache_storage.pb.h" |
#include "content/browser/cache_storage/cache_storage_quota_client.h" |
@@ -125,9 +126,12 @@ class CacheStorageManagerTest : public testing::Test { |
} |
void StringsAndErrorCallback(base::RunLoop* run_loop, |
- const std::vector<std::string>& strings, |
+ const std::vector<base::string16>& strings, |
CacheStorageError error) { |
- callback_strings_ = strings; |
+ callback_strings_.clear(); |
+ for (const auto& name : strings) { |
+ callback_strings_.push_back(base::UTF16ToUTF8(name)); |
+ } |
callback_error_ = error; |
run_loop->Quit(); |
} |
@@ -151,7 +155,7 @@ class CacheStorageManagerTest : public testing::Test { |
bool Open(const GURL& origin, const std::string& cache_name) { |
base::RunLoop loop; |
cache_manager_->OpenCache( |
- origin, cache_name, |
+ origin, base::UTF8ToUTF16(cache_name), |
base::Bind(&CacheStorageManagerTest::CacheAndErrorCallback, |
base::Unretained(this), base::Unretained(&loop))); |
loop.Run(); |
@@ -167,7 +171,7 @@ class CacheStorageManagerTest : public testing::Test { |
bool Has(const GURL& origin, const std::string& cache_name) { |
base::RunLoop loop; |
cache_manager_->HasCache( |
- origin, cache_name, |
+ origin, base::UTF8ToUTF16(cache_name), |
base::Bind(&CacheStorageManagerTest::BoolAndErrorCallback, |
base::Unretained(this), base::Unretained(&loop))); |
loop.Run(); |
@@ -178,7 +182,7 @@ class CacheStorageManagerTest : public testing::Test { |
bool Delete(const GURL& origin, const std::string& cache_name) { |
base::RunLoop loop; |
cache_manager_->DeleteCache( |
- origin, cache_name, |
+ origin, base::UTF8ToUTF16(cache_name), |
base::Bind(&CacheStorageManagerTest::BoolAndErrorCallback, |
base::Unretained(this), base::Unretained(&loop))); |
loop.Run(); |
@@ -204,7 +208,7 @@ class CacheStorageManagerTest : public testing::Test { |
request->url = url; |
base::RunLoop loop; |
cache_manager_->MatchCache( |
- origin, cache_name, std::move(request), |
+ origin, base::UTF8ToUTF16(cache_name), std::move(request), |
base::Bind(&CacheStorageManagerTest::CacheMatchCallback, |
base::Unretained(this), base::Unretained(&loop))); |
loop.Run(); |
@@ -611,7 +615,7 @@ TEST_P(CacheStorageManagerTestP, OpenRunsSerially) { |
base::RunLoop open_loop; |
cache_manager_->OpenCache( |
- origin1_, "foo", |
+ origin1_, base::UTF8ToUTF16("foo"), |
base::Bind(&CacheStorageManagerTest::CacheAndErrorCallback, |
base::Unretained(this), base::Unretained(&open_loop))); |