OLD | NEW |
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 COMPONENTS_NACL_BROWSER_PNACL_HOST_H_ | 5 #ifndef COMPONENTS_NACL_BROWSER_PNACL_HOST_H_ |
6 #define COMPONENTS_NACL_BROWSER_PNACL_HOST_H_ | 6 #define COMPONENTS_NACL_BROWSER_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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 base::Time end_time, | 94 base::Time end_time, |
95 const base::Closure& callback); | 95 const base::Closure& callback); |
96 | 96 |
97 // Return the number of tracked translations or FD requests currently pending. | 97 // Return the number of tracked translations or FD requests currently pending. |
98 size_t pending_translations() { return pending_translations_.size(); } | 98 size_t pending_translations() { return pending_translations_.size(); } |
99 | 99 |
100 private: | 100 private: |
101 // PnaclHost is a singleton because there is only one translation cache, and | 101 // PnaclHost is a singleton because there is only one translation cache, and |
102 // so that the BrowsingDataRemover can clear it even if no translation has | 102 // so that the BrowsingDataRemover can clear it even if no translation has |
103 // ever been started. | 103 // ever been started. |
104 friend struct DefaultSingletonTraits<PnaclHost>; | 104 friend struct base::DefaultSingletonTraits<PnaclHost>; |
105 friend class FileProxy; | 105 friend class FileProxy; |
106 friend class pnacl::PnaclHostTest; | 106 friend class pnacl::PnaclHostTest; |
107 friend class pnacl::PnaclHostTestDisk; | 107 friend class pnacl::PnaclHostTestDisk; |
108 enum CacheState { | 108 enum CacheState { |
109 CacheUninitialized, | 109 CacheUninitialized, |
110 CacheInitializing, | 110 CacheInitializing, |
111 CacheReady | 111 CacheReady |
112 }; | 112 }; |
113 class PendingTranslation { | 113 class PendingTranslation { |
114 public: | 114 public: |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 scoped_ptr<pnacl::PnaclTranslationCache> disk_cache_; | 173 scoped_ptr<pnacl::PnaclTranslationCache> disk_cache_; |
174 PendingTranslationMap pending_translations_; | 174 PendingTranslationMap pending_translations_; |
175 base::ThreadChecker thread_checker_; | 175 base::ThreadChecker thread_checker_; |
176 base::WeakPtrFactory<PnaclHost> weak_factory_; | 176 base::WeakPtrFactory<PnaclHost> weak_factory_; |
177 DISALLOW_COPY_AND_ASSIGN(PnaclHost); | 177 DISALLOW_COPY_AND_ASSIGN(PnaclHost); |
178 }; | 178 }; |
179 | 179 |
180 } // namespace pnacl | 180 } // namespace pnacl |
181 | 181 |
182 #endif // COMPONENTS_NACL_BROWSER_PNACL_HOST_H_ | 182 #endif // COMPONENTS_NACL_BROWSER_PNACL_HOST_H_ |
OLD | NEW |