| Index: net/http/http_cache_unittest.cc
|
| ===================================================================
|
| --- net/http/http_cache_unittest.cc (revision 147723)
|
| +++ net/http/http_cache_unittest.cc (working copy)
|
| @@ -79,7 +79,7 @@
|
| // write to the cache
|
|
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache->CreateTransaction(&trans);
|
| + int rv = cache->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
| ASSERT_TRUE(trans.get());
|
|
|
| @@ -396,7 +396,7 @@
|
| MockHttpCache cache;
|
|
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
| ASSERT_TRUE(trans.get());
|
| }
|
| @@ -500,7 +500,7 @@
|
| MockHttpRequest request(kSimpleGET_Transaction);
|
|
|
| scoped_ptr<Context> c(new Context());
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -545,7 +545,7 @@
|
|
|
| // Now fail to read from the cache.
|
| scoped_ptr<Context> c(new Context());
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| MockHttpRequest request(kSimpleGET_Transaction);
|
| @@ -645,7 +645,7 @@
|
| net::TestCompletionCallback callback;
|
|
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
| ASSERT_TRUE(trans.get());
|
|
|
| @@ -871,7 +871,7 @@
|
| context_list.push_back(new Context());
|
| Context* c = context_list[i];
|
|
|
| - c->result = cache.http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
| EXPECT_EQ(net::LOAD_STATE_IDLE, c->trans->GetLoadState());
|
|
|
| @@ -939,7 +939,7 @@
|
| context_list.push_back(new Context());
|
| Context* c = context_list[i];
|
|
|
| - c->result = cache.http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
|
|
| MockHttpRequest* this_request = &request;
|
| @@ -1024,7 +1024,7 @@
|
| context_list.push_back(new Context());
|
| Context* c = context_list[i];
|
|
|
| - c->result = cache.http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
|
|
| MockHttpRequest* this_request = &request;
|
| @@ -1072,7 +1072,7 @@
|
| context_list.push_back(new Context());
|
| Context* c = context_list[i];
|
|
|
| - c->result = cache.http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
|
|
| c->result = c->trans->Start(
|
| @@ -1119,7 +1119,7 @@
|
| context_list.push_back(new Context());
|
| Context* c = context_list[i];
|
|
|
| - c->result = cache.http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
|
|
| c->result = c->trans->Start(
|
| @@ -1179,7 +1179,7 @@
|
| context_list.push_back(new Context());
|
| Context* c = context_list[i];
|
|
|
| - c->result = cache.http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
|
|
| c->result = c->trans->Start(
|
| @@ -1230,7 +1230,7 @@
|
|
|
| Context* c = new Context();
|
|
|
| - c->result = cache.http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
|
|
| c->result = c->trans->Start(
|
| @@ -1260,7 +1260,7 @@
|
| context_list.push_back(new Context());
|
| Context* c = context_list[i];
|
|
|
| - c->result = cache.http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
|
|
| c->result = c->trans->Start(
|
| @@ -1302,7 +1302,7 @@
|
| net::TestCompletionCallback callback;
|
|
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
| rv = trans->Start(&request, callback.callback(), net::BoundNetLog());
|
| if (rv == net::ERR_IO_PENDING)
|
| @@ -1337,7 +1337,7 @@
|
| context_list.push_back(new Context());
|
| Context* c = context_list[i];
|
|
|
| - c->result = cache->http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache->http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
|
|
| c->result = c->trans->Start(
|
| @@ -1376,7 +1376,7 @@
|
| context_list.push_back(new Context());
|
| Context* c = context_list[i];
|
|
|
| - c->result = cache.http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
| }
|
|
|
| @@ -1422,7 +1422,7 @@
|
| context_list.push_back(new Context());
|
| Context* c = context_list[i];
|
|
|
| - c->result = cache.http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
| }
|
|
|
| @@ -1468,7 +1468,7 @@
|
| MockHttpRequest request(kSimpleGET_Transaction);
|
|
|
| scoped_ptr<Context> c(new Context());
|
| - c->result = cache->http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache->http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
|
|
| c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -1506,7 +1506,7 @@
|
| MockHttpRequest request(kSimpleGET_Transaction);
|
|
|
| scoped_ptr<Context> c(new Context());
|
| - c->result = cache->http_cache()->CreateTransaction(&c->trans);
|
| + c->result = cache->http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, c->result);
|
|
|
| c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -2192,7 +2192,7 @@
|
| net::TestCompletionCallback callback;
|
|
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
| ASSERT_TRUE(trans.get());
|
|
|
| @@ -3253,7 +3253,7 @@
|
| MockHttpRequest request(kRangeGET_TransactionOK);
|
|
|
| Context* c = new Context();
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -3292,7 +3292,7 @@
|
| request.load_flags |= net::LOAD_VALIDATE_CACHE;
|
|
|
| Context* c = new Context();
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -3337,7 +3337,7 @@
|
| request.load_flags |= net::LOAD_VALIDATE_CACHE;
|
|
|
| Context* c = new Context();
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -3364,7 +3364,7 @@
|
| // active entry (no open or create).
|
|
|
| c = new Context();
|
| - rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -3645,7 +3645,7 @@
|
| net::TestCompletionCallback callback;
|
|
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
| ASSERT_TRUE(trans.get());
|
|
|
| @@ -3723,7 +3723,7 @@
|
| MockHttpRequest request(kSimpleGET_Transaction);
|
|
|
| Context* c = new Context();
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -3753,7 +3753,7 @@
|
| MockHttpRequest request(kSimpleGET_Transaction);
|
|
|
| Context* c = new Context();
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -3796,7 +3796,7 @@
|
| MockHttpRequest request(transaction);
|
|
|
| Context* c = new Context();
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -3839,7 +3839,7 @@
|
| MockHttpRequest request(transaction);
|
|
|
| scoped_ptr<Context> c(new Context());
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -3899,7 +3899,7 @@
|
| MockHttpRequest request(transaction);
|
|
|
| scoped_ptr<Context> c(new Context());
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| @@ -4043,7 +4043,7 @@
|
| MockHttpRequest request(transaction);
|
| Context* c = new Context();
|
|
|
| - int rv = cache.http_cache()->CreateTransaction(&c->trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&c->trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| // Queue another request to this transaction. We have to start this request
|
| @@ -4051,7 +4051,8 @@
|
| // otherwise it will just create a new entry without being queued to the first
|
| // request.
|
| Context* pending = new Context();
|
| - EXPECT_EQ(net::OK, cache.http_cache()->CreateTransaction(&pending->trans));
|
| + EXPECT_EQ(net::OK,
|
| + cache.http_cache()->CreateTransaction(&pending->trans, NULL));
|
|
|
| rv = c->trans->Start(&request, c->callback.callback(), net::BoundNetLog());
|
| EXPECT_EQ(net::ERR_IO_PENDING,
|
| @@ -4135,7 +4136,7 @@
|
| "rg: 50-59 rg: 60-69 rg: 70-79 ";
|
|
|
| scoped_ptr<Context> c(new Context);
|
| - EXPECT_EQ(net::OK, cache.http_cache()->CreateTransaction(&c->trans));
|
| + EXPECT_EQ(net::OK, cache.http_cache()->CreateTransaction(&c->trans, NULL));
|
|
|
| MockHttpRequest request(transaction);
|
| int rv = c->trans->Start(
|
| @@ -4207,7 +4208,7 @@
|
|
|
| MockHttpRequest request(transaction);
|
| Context* c = new Context();
|
| - EXPECT_EQ(net::OK, cache.http_cache()->CreateTransaction(&c->trans));
|
| + EXPECT_EQ(net::OK, cache.http_cache()->CreateTransaction(&c->trans, NULL));
|
|
|
| int rv = c->trans->Start(
|
| &request, c->callback.callback(), net::BoundNetLog());
|
| @@ -4335,7 +4336,7 @@
|
| // write to the cache
|
| {
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
| ASSERT_TRUE(trans.get());
|
|
|
| @@ -4363,7 +4364,7 @@
|
| // read from the cache
|
| {
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
| ASSERT_TRUE(trans.get());
|
|
|
| @@ -4488,7 +4489,7 @@
|
| net::TestCompletionCallback callback;
|
|
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
| ASSERT_TRUE(trans.get());
|
|
|
| @@ -4503,7 +4504,7 @@
|
| MockHttpCache* cache = new MockHttpCache;
|
|
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache->http_cache()->CreateTransaction(&trans);
|
| + int rv = cache->http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| delete cache;
|
| @@ -4741,7 +4742,7 @@
|
|
|
| {
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| MockHttpRequest request(kSimpleGET_Transaction);
|
| @@ -4775,7 +4776,7 @@
|
|
|
| {
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = trans->Start(&request, callback.callback(), net::BoundNetLog());
|
| @@ -4813,7 +4814,7 @@
|
|
|
| {
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| // Force a response that can be resumed.
|
| @@ -4870,7 +4871,7 @@
|
| {
|
| // Now make a regular request.
|
| scoped_ptr<net::HttpTransaction> trans;
|
| - int rv = cache.http_cache()->CreateTransaction(&trans);
|
| + int rv = cache.http_cache()->CreateTransaction(&trans, NULL);
|
| EXPECT_EQ(net::OK, rv);
|
|
|
| rv = trans->Start(&request, callback.callback(), net::BoundNetLog());
|
|
|