Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: content/browser/appcache/appcache_service_unittest.cc

Issue 1154283003: Change most uses of Pickle to base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/pickle.h" 9 #include "base/pickle.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 net::HttpResponseInfo* info = new net::HttpResponseInfo; 150 net::HttpResponseInfo* info = new net::HttpResponseInfo;
151 info->request_time = base::Time::Now(); 151 info->request_time = base::Time::Now();
152 info->response_time = base::Time::Now(); 152 info->response_time = base::Time::Now();
153 info->was_cached = false; 153 info->was_cached = false;
154 info->headers = new net::HttpResponseHeaders( 154 info->headers = new net::HttpResponseHeaders(
155 std::string(kMockHeaders, arraysize(kMockHeaders))); 155 std::string(kMockHeaders, arraysize(kMockHeaders)));
156 return info; 156 return info;
157 } 157 }
158 158
159 int GetResponseInfoSize(const net::HttpResponseInfo* info) { 159 int GetResponseInfoSize(const net::HttpResponseInfo* info) {
160 Pickle pickle; 160 base::Pickle pickle;
161 return PickleResponseInfo(&pickle, info); 161 return PickleResponseInfo(&pickle, info);
162 } 162 }
163 163
164 int PickleResponseInfo(Pickle* pickle, const net::HttpResponseInfo* info) { 164 int PickleResponseInfo(base::Pickle* pickle,
165 const net::HttpResponseInfo* info) {
165 const bool kSkipTransientHeaders = true; 166 const bool kSkipTransientHeaders = true;
166 const bool kTruncated = false; 167 const bool kTruncated = false;
167 info->Persist(pickle, kSkipTransientHeaders, kTruncated); 168 info->Persist(pickle, kSkipTransientHeaders, kTruncated);
168 return pickle->size(); 169 return pickle->size();
169 } 170 }
170 171
171 const GURL kOrigin; 172 const GURL kOrigin;
172 const GURL kManifestUrl; 173 const GURL kManifestUrl;
173 174
174 scoped_ptr<AppCacheServiceImpl> service_; 175 scoped_ptr<AppCacheServiceImpl> service_;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 EXPECT_EQ(kOneHour, service->reinit_timer_.GetCurrentDelay()); 369 EXPECT_EQ(kOneHour, service->reinit_timer_.GetCurrentDelay());
369 EXPECT_EQ(kOneHour, service->next_reinit_delay_); 370 EXPECT_EQ(kOneHour, service->next_reinit_delay_);
370 371
371 // Fine to delete while pending. 372 // Fine to delete while pending.
372 service.reset(NULL); 373 service.reset(NULL);
373 } 374 }
374 375
375 376
376 377
377 } // namespace content 378 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_response_unittest.cc ('k') | content/browser/appcache/appcache_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698