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

Side by Side Diff: extensions/browser/api/web_request/web_request_api.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_
6 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ 6 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 void OnOTRBrowserContextCreated(void* original_browser_context, 303 void OnOTRBrowserContextCreated(void* original_browser_context,
304 void* otr_browser_context); 304 void* otr_browser_context);
305 void OnOTRBrowserContextDestroyed(void* original_browser_context, 305 void OnOTRBrowserContextDestroyed(void* original_browser_context,
306 void* otr_browser_context); 306 void* otr_browser_context);
307 307
308 // Registers a |callback| that is executed when the next page load happens. 308 // Registers a |callback| that is executed when the next page load happens.
309 // The callback is then deleted. 309 // The callback is then deleted.
310 void AddCallbackForPageLoad(const base::Closure& callback); 310 void AddCallbackForPageLoad(const base::Closure& callback);
311 311
312 private: 312 private:
313 friend struct DefaultSingletonTraits<ExtensionWebRequestEventRouter>; 313 friend struct base::DefaultSingletonTraits<ExtensionWebRequestEventRouter>;
314 314
315 struct EventListener; 315 struct EventListener;
316 using EventListeners = std::vector<const EventListener*>; 316 using EventListeners = std::vector<const EventListener*>;
317 using ListenerMapForBrowserContext = 317 using ListenerMapForBrowserContext =
318 std::map<std::string, std::set<EventListener>>; 318 std::map<std::string, std::set<EventListener>>;
319 using ListenerMap = std::map<void*, ListenerMapForBrowserContext>; 319 using ListenerMap = std::map<void*, ListenerMapForBrowserContext>;
320 using BlockedRequestMap = std::map<uint64_t, BlockedRequest>; 320 using BlockedRequestMap = std::map<uint64_t, BlockedRequest>;
321 // Map of request_id -> bit vector of EventTypes already signaled 321 // Map of request_id -> bit vector of EventTypes already signaled
322 using SignaledRequestMap = std::map<uint64_t, int>; 322 using SignaledRequestMap = std::map<uint64_t, int>;
323 // For each browser_context: a bool indicating whether it is an incognito 323 // For each browser_context: a bool indicating whether it is an incognito
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 extensions::QuotaLimitHeuristics* heuristics) const override; 552 extensions::QuotaLimitHeuristics* heuristics) const override;
553 // Handle quota exceeded gracefully: Only warn the user but still execute the 553 // Handle quota exceeded gracefully: Only warn the user but still execute the
554 // function. 554 // function.
555 void OnQuotaExceeded(const std::string& error) override; 555 void OnQuotaExceeded(const std::string& error) override;
556 bool RunSync() override; 556 bool RunSync() override;
557 }; 557 };
558 558
559 } // namespace extensions 559 } // namespace extensions
560 560
561 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ 561 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/vpn_provider/vpn_service_factory.h ('k') | extensions/browser/api/web_request/web_request_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698