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

Side by Side Diff: webkit/appcache/appcache_disk_cache.cc

Issue 6005015: Revert 70618 - First pass at adding http/backend cache events to the NetLog. ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « net/url_request/view_cache_helper_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/appcache/appcache_disk_cache.h" 5 #include "webkit/appcache/appcache_disk_cache.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 const FilePath& cache_directory, 101 const FilePath& cache_directory,
102 int cache_size, bool force, 102 int cache_size, bool force,
103 base::MessageLoopProxy* cache_thread, 103 base::MessageLoopProxy* cache_thread,
104 net::CompletionCallback* callback) { 104 net::CompletionCallback* callback) {
105 DCHECK(!is_initializing() && !disk_cache_.get()); 105 DCHECK(!is_initializing() && !disk_cache_.get());
106 is_disabled_ = false; 106 is_disabled_ = false;
107 create_backend_callback_ = new CreateBackendCallback( 107 create_backend_callback_ = new CreateBackendCallback(
108 this, &AppCacheDiskCache::OnCreateBackendComplete); 108 this, &AppCacheDiskCache::OnCreateBackendComplete);
109 109
110 int rv = disk_cache::CreateCacheBackend( 110 int rv = disk_cache::CreateCacheBackend(
111 cache_type, cache_directory, cache_size, force, cache_thread, NULL, 111 cache_type, cache_directory, cache_size, force, cache_thread,
112 &(create_backend_callback_->backend_ptr_), create_backend_callback_); 112 &(create_backend_callback_->backend_ptr_), create_backend_callback_);
113 if (rv == net::ERR_IO_PENDING) 113 if (rv == net::ERR_IO_PENDING)
114 init_callback_ = callback; 114 init_callback_ = callback;
115 else 115 else
116 OnCreateBackendComplete(rv); 116 OnCreateBackendComplete(rv);
117 return rv; 117 return rv;
118 } 118 }
119 119
120 void AppCacheDiskCache::OnCreateBackendComplete(int rv) { 120 void AppCacheDiskCache::OnCreateBackendComplete(int rv) {
121 if (rv == net::OK) { 121 if (rv == net::OK) {
(...skipping 27 matching lines...) Expand all
149 break; 149 break;
150 } 150 }
151 if (rv != net::ERR_IO_PENDING) 151 if (rv != net::ERR_IO_PENDING)
152 iter->callback->Run(rv); 152 iter->callback->Run(rv);
153 } 153 }
154 pending_calls_.clear(); 154 pending_calls_.clear();
155 } 155 }
156 156
157 } // namespace appcache 157 } // namespace appcache
158 158
OLDNEW
« no previous file with comments | « net/url_request/view_cache_helper_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698