summaryrefslogtreecommitdiff
path: root/chromium/net/disk_cache/simple/simple_index_file_unittest.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-08-14 11:38:45 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-08-14 17:16:47 +0000
commit3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859 (patch)
tree43cc572ba067417c7341db81f71ae7cc6e0fcc3e /chromium/net/disk_cache/simple/simple_index_file_unittest.cc
parentf61ab1ac7f855cd281809255c0aedbb1895e1823 (diff)
downloadqtwebengine-chromium-3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859.tar.gz
BASELINE: Update chromium to 45.0.2454.40
Change-Id: Id2121d9f11a8fc633677236c65a3e41feef589e4 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'chromium/net/disk_cache/simple/simple_index_file_unittest.cc')
-rw-r--r--chromium/net/disk_cache/simple/simple_index_file_unittest.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/chromium/net/disk_cache/simple/simple_index_file_unittest.cc b/chromium/net/disk_cache/simple/simple_index_file_unittest.cc
index 4cedab2844a..cfff0792f9a 100644
--- a/chromium/net/disk_cache/simple/simple_index_file_unittest.cc
+++ b/chromium/net/disk_cache/simple/simple_index_file_unittest.cc
@@ -6,10 +6,12 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/hash.h"
+#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/pickle.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread.h"
@@ -50,9 +52,9 @@ TEST(IndexMetadataTest, Basics) {
TEST(IndexMetadataTest, Serialize) {
SimpleIndexFile::IndexMetadata index_metadata(123, 456);
- Pickle pickle;
+ base::Pickle pickle;
index_metadata.Serialize(&pickle);
- PickleIterator it(pickle);
+ base::PickleIterator it(pickle);
SimpleIndexFile::IndexMetadata new_index_metadata;
new_index_metadata.Deserialize(&it);
@@ -114,8 +116,8 @@ TEST_F(SimpleIndexFileTest, Serialize) {
SimpleIndex::InsertInEntrySet(hash, metadata_entries[i], &entries);
}
- scoped_ptr<Pickle> pickle = WrappedSimpleIndexFile::Serialize(
- index_metadata, entries);
+ scoped_ptr<base::Pickle> pickle =
+ WrappedSimpleIndexFile::Serialize(index_metadata, entries);
EXPECT_TRUE(pickle.get() != NULL);
base::Time now = base::Time::Now();
EXPECT_TRUE(WrappedSimpleIndexFile::SerializeFinalData(now, pickle.get()));
@@ -274,11 +276,8 @@ TEST_F(SimpleIndexFileTest, SimpleCacheUpgrade) {
ASSERT_TRUE(cache_thread.StartWithOptions(
base::Thread::Options(base::MessageLoop::TYPE_IO, 0)));
disk_cache::SimpleBackendImpl* simple_cache =
- new disk_cache::SimpleBackendImpl(cache_path,
- 0,
- net::DISK_CACHE,
- cache_thread.message_loop_proxy().get(),
- NULL);
+ new disk_cache::SimpleBackendImpl(cache_path, 0, net::DISK_CACHE,
+ cache_thread.task_runner().get(), NULL);
net::TestCompletionCallback cb;
int rv = simple_cache->Init(cb.callback());
EXPECT_EQ(net::OK, cb.GetResult(rv));
@@ -291,7 +290,7 @@ TEST_F(SimpleIndexFileTest, SimpleCacheUpgrade) {
// thread after that.
MessageLoopHelper helper;
CallbackTest cb_shutdown(&helper, false);
- cache_thread.message_loop_proxy()->PostTask(
+ cache_thread.task_runner()->PostTask(
FROM_HERE,
base::Bind(&CallbackTest::Run, base::Unretained(&cb_shutdown), net::OK));
helper.WaitUntilCacheIoFinished(1);