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

Side by Side Diff: chrome/browser/nacl_host/pnacl_host.h

Issue 28933003: Delete PNaCl translation cache backend object when no longer needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add dcheck Created 7 years, 1 month 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 | « no previous file | chrome/browser/nacl_host/pnacl_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_NACL_HOST_PNACL_HOST_H_ 5 #ifndef CHROME_BROWSER_NACL_HOST_PNACL_HOST_H_
6 #define CHROME_BROWSER_NACL_HOST_PNACL_HOST_H_ 6 #define CHROME_BROWSER_NACL_HOST_PNACL_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 void StoreTranslatedNexe(TranslationID id, 150 void StoreTranslatedNexe(TranslationID id,
151 scoped_refptr<net::DrainableIOBuffer>); 151 scoped_refptr<net::DrainableIOBuffer>);
152 void OnTranslatedNexeStored(const TranslationID& id, int net_error); 152 void OnTranslatedNexeStored(const TranslationID& id, int net_error);
153 void RequeryMatchingTranslations(const std::string& key); 153 void RequeryMatchingTranslations(const std::string& key);
154 154
155 // GetNexeFd hit path 155 // GetNexeFd hit path
156 static int CopyBufferToFile(base::PlatformFile fd, 156 static int CopyBufferToFile(base::PlatformFile fd,
157 scoped_refptr<net::DrainableIOBuffer> buffer); 157 scoped_refptr<net::DrainableIOBuffer> buffer);
158 void OnBufferCopiedToTempFile(const TranslationID& id, int file_error); 158 void OnBufferCopiedToTempFile(const TranslationID& id, int file_error);
159 159
160 static void OnEntriesDoomed(const base::Closure& callback, int net_error); 160 void OnEntriesDoomed(const base::Closure& callback, int net_error);
161 161
162 void DeInitIfSafe();
163
164 // Operations which are pending with the cache backend, which we should
165 // wait for before destroying it (see comment on DeInitIfSafe).
166 int pending_backend_operations_;
162 CacheState cache_state_; 167 CacheState cache_state_;
163 base::FilePath temp_dir_; 168 base::FilePath temp_dir_;
164 scoped_ptr<pnacl::PnaclTranslationCache> disk_cache_; 169 scoped_ptr<pnacl::PnaclTranslationCache> disk_cache_;
165 PendingTranslationMap pending_translations_; 170 PendingTranslationMap pending_translations_;
166 base::ThreadChecker thread_checker_; 171 base::ThreadChecker thread_checker_;
167 base::WeakPtrFactory<PnaclHost> weak_factory_; 172 base::WeakPtrFactory<PnaclHost> weak_factory_;
168 DISALLOW_COPY_AND_ASSIGN(PnaclHost); 173 DISALLOW_COPY_AND_ASSIGN(PnaclHost);
169 }; 174 };
170 175
171 #endif // CHROME_BROWSER_NACL_HOST_PNACL_HOST_H_ 176 #endif // CHROME_BROWSER_NACL_HOST_PNACL_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/nacl_host/pnacl_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698