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

Side by Side Diff: chrome/browser/nacl_host/pnacl_translation_cache.cc

Issue 20737002: Change the API of disk_cache::CreateCacheBackend to use scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new test Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/nacl_host/pnacl_translation_cache.h" 5 #include "chrome/browser/nacl_host/pnacl_translation_cache.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } 297 }
298 } 298 }
299 299
300 ////////////////////////////////////////////////////////////////////// 300 //////////////////////////////////////////////////////////////////////
301 void PnaclTranslationCache::OpComplete(PnaclTranslationCacheEntry* entry) { 301 void PnaclTranslationCache::OpComplete(PnaclTranslationCacheEntry* entry) {
302 open_entries_.erase(entry); 302 open_entries_.erase(entry);
303 } 303 }
304 304
305 ////////////////////////////////////////////////////////////////////// 305 //////////////////////////////////////////////////////////////////////
306 // Construction and cache backend initialization 306 // Construction and cache backend initialization
307 PnaclTranslationCache::PnaclTranslationCache() 307 PnaclTranslationCache::PnaclTranslationCache() : in_memory_(false) {}
308 : disk_cache_(NULL), in_memory_(false) {}
309 308
310 PnaclTranslationCache::~PnaclTranslationCache() { delete disk_cache_; } 309 PnaclTranslationCache::~PnaclTranslationCache() {}
311 310
312 int PnaclTranslationCache::InitWithDiskBackend( 311 int PnaclTranslationCache::InitWithDiskBackend(
313 const base::FilePath& cache_dir, 312 const base::FilePath& cache_dir,
314 int cache_size, 313 int cache_size,
315 const CompletionCallback& callback) { 314 const CompletionCallback& callback) {
316 return Init(net::DISK_CACHE, cache_dir, cache_size, callback); 315 return Init(net::DISK_CACHE, cache_dir, cache_size, callback);
317 } 316 }
318 317
319 int PnaclTranslationCache::InitWithMemBackend( 318 int PnaclTranslationCache::InitWithMemBackend(
320 int cache_size, 319 int cache_size,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 retval += "modified:" + IntToString(exploded.year) + ":" + 421 retval += "modified:" + IntToString(exploded.year) + ":" +
423 IntToString(exploded.month) + ":" + 422 IntToString(exploded.month) + ":" +
424 IntToString(exploded.day_of_month) + ":" + 423 IntToString(exploded.day_of_month) + ":" +
425 IntToString(exploded.hour) + ":" + IntToString(exploded.minute) + ":" + 424 IntToString(exploded.hour) + ":" + IntToString(exploded.minute) + ":" +
426 IntToString(exploded.second) + ":" + 425 IntToString(exploded.second) + ":" +
427 IntToString(exploded.millisecond) + ":UTC;"; 426 IntToString(exploded.millisecond) + ":UTC;";
428 retval += "etag:" + info.etag; 427 retval += "etag:" + info.etag;
429 return retval; 428 return retval;
430 } 429 }
431 } // namespace pnacl 430 } // namespace pnacl
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/pnacl_translation_cache.h ('k') | content/browser/gpu/shader_disk_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698