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

Side by Side Diff: components/nacl/browser/pnacl_host.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
« no previous file with comments | « components/nacl/browser/nacl_browser.cc ('k') | components/nacl/browser/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 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
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
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_
OLDNEW
« no previous file with comments | « components/nacl/browser/nacl_browser.cc ('k') | components/nacl/browser/pnacl_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698