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

Side by Side Diff: components/nacl/browser/nacl_browser.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
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_NACL_BROWSER_H_ 5 #ifndef COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_
6 #define COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ 6 #define COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Each time a NaCl process ends, the browser is notified. 131 // Each time a NaCl process ends, the browser is notified.
132 void OnProcessEnd(int process_id); 132 void OnProcessEnd(int process_id);
133 // Support for NaCl crash throttling. 133 // Support for NaCl crash throttling.
134 // Each time a NaCl module crashes, the browser is notified. 134 // Each time a NaCl module crashes, the browser is notified.
135 void OnProcessCrashed(); 135 void OnProcessCrashed();
136 // If "too many" crashes occur within a given time period, NaCl is throttled 136 // If "too many" crashes occur within a given time period, NaCl is throttled
137 // until the rate again drops below the threshold. 137 // until the rate again drops below the threshold.
138 bool IsThrottled(); 138 bool IsThrottled();
139 139
140 private: 140 private:
141 friend struct DefaultSingletonTraits<NaClBrowser>; 141 friend struct base::DefaultSingletonTraits<NaClBrowser>;
142 142
143 enum NaClResourceState { 143 enum NaClResourceState {
144 NaClResourceUninitialized, 144 NaClResourceUninitialized,
145 NaClResourceRequested, 145 NaClResourceRequested,
146 NaClResourceReady 146 NaClResourceReady
147 }; 147 };
148 148
149 NaClBrowser(); 149 NaClBrowser();
150 ~NaClBrowser(); 150 ~NaClBrowser();
151 151
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 // Singletons get destroyed at shutdown. 201 // Singletons get destroyed at shutdown.
202 base::WeakPtrFactory<NaClBrowser> weak_factory_; 202 base::WeakPtrFactory<NaClBrowser> weak_factory_;
203 203
204 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); 204 DISALLOW_COPY_AND_ASSIGN(NaClBrowser);
205 }; 205 };
206 206
207 } // namespace nacl 207 } // namespace nacl
208 208
209 #endif // COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_ 209 #endif // COMPONENTS_NACL_BROWSER_NACL_BROWSER_H_
OLDNEW
« no previous file with comments | « components/nacl/browser/nacl_broker_service_win.cc ('k') | components/nacl/browser/nacl_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698