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 CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_LOG_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_LOG_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_LOG_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_LOG_PRIVATE_API_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/files/scoped_file.h" | 11 #include "base/files/scoped_file.h" |
12 #include "base/scoped_observer.h" | 12 #include "base/scoped_observer.h" |
13 #include "chrome/browser/extensions/api/log_private/filter_handler.h" | 13 #include "chrome/browser/extensions/api/log_private/filter_handler.h" |
14 #include "chrome/browser/extensions/api/log_private/log_parser.h" | 14 #include "chrome/browser/extensions/api/log_private/log_parser.h" |
15 #include "chrome/browser/extensions/chrome_extension_function.h" | 15 #include "chrome/browser/extensions/chrome_extension_function.h" |
16 #include "chrome/browser/feedback/system_logs/about_system_logs_fetcher.h" | 16 #include "chrome/browser/feedback/system_logs/about_system_logs_fetcher.h" |
17 #include "chrome/common/extensions/api/log_private.h" | 17 #include "chrome/common/extensions/api/log_private.h" |
18 #include "extensions/browser/api/api_resource.h" | 18 #include "extensions/browser/api/api_resource.h" |
19 #include "extensions/browser/api/api_resource_manager.h" | 19 #include "extensions/browser/api/api_resource_manager.h" |
20 #include "extensions/browser/browser_context_keyed_api_factory.h" | 20 #include "extensions/browser/browser_context_keyed_api_factory.h" |
21 #include "extensions/browser/extension_registry_observer.h" | 21 #include "extensions/browser/extension_registry_observer.h" |
22 #include "net/log/net_log.h" | 22 #include "net/log/net_log.h" |
23 #include "net/log/net_log_logger.h" | 23 #include "net/log/write_to_file_net_log_observer.h" |
24 | 24 |
25 class IOThread; | 25 class IOThread; |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 class BrowserContext; | 28 class BrowserContext; |
29 } | 29 } |
30 | 30 |
31 namespace extensions { | 31 namespace extensions { |
32 class ExtensionRegistry; | 32 class ExtensionRegistry; |
33 | 33 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 return "LogPrivateAPI"; | 106 return "LogPrivateAPI"; |
107 } | 107 } |
108 static const bool kServiceIsNULLWhileTesting = true; | 108 static const bool kServiceIsNULLWhileTesting = true; |
109 static const bool kServiceRedirectedInIncognito = true; | 109 static const bool kServiceRedirectedInIncognito = true; |
110 | 110 |
111 content::BrowserContext* const browser_context_; | 111 content::BrowserContext* const browser_context_; |
112 bool logging_net_internals_; | 112 bool logging_net_internals_; |
113 api::log_private::EventSink event_sink_; | 113 api::log_private::EventSink event_sink_; |
114 std::set<std::string> net_internal_watches_; | 114 std::set<std::string> net_internal_watches_; |
115 scoped_ptr<base::ListValue> pending_entries_; | 115 scoped_ptr<base::ListValue> pending_entries_; |
116 scoped_ptr<net::NetLogLogger> net_log_logger_; | 116 scoped_ptr<net::WriteToFileNetLogObserver> write_to_file_observer_; |
117 // Listen to extension unloaded notifications. | 117 // Listen to extension unloaded notifications. |
118 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 118 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
119 extension_registry_observer_; | 119 extension_registry_observer_; |
120 ApiResourceManager<FileResource, WorkerPoolThreadTraits<FileResource> > | 120 ApiResourceManager<FileResource, WorkerPoolThreadTraits<FileResource> > |
121 log_file_resources_; | 121 log_file_resources_; |
122 bool initialized_; | 122 bool initialized_; |
123 | 123 |
124 DISALLOW_COPY_AND_ASSIGN(LogPrivateAPI); | 124 DISALLOW_COPY_AND_ASSIGN(LogPrivateAPI); |
125 }; | 125 }; |
126 | 126 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // Callback for DebugLogWriter::StoreLogs() call. | 191 // Callback for DebugLogWriter::StoreLogs() call. |
192 void OnStoreLogsCompleted(const base::FilePath& log_path, bool succeeded); | 192 void OnStoreLogsCompleted(const base::FilePath& log_path, bool succeeded); |
193 // Callback for LogPrivateAPI::StopAllWatches() call. | 193 // Callback for LogPrivateAPI::StopAllWatches() call. |
194 void OnStopAllWatches(); | 194 void OnStopAllWatches(); |
195 DISALLOW_COPY_AND_ASSIGN(LogPrivateDumpLogsFunction); | 195 DISALLOW_COPY_AND_ASSIGN(LogPrivateDumpLogsFunction); |
196 }; | 196 }; |
197 | 197 |
198 } // namespace extensions | 198 } // namespace extensions |
199 | 199 |
200 #endif // CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_LOG_PRIVATE_API_H_ | 200 #endif // CHROME_BROWSER_EXTENSIONS_API_LOG_PRIVATE_LOG_PRIVATE_API_H_ |
OLD | NEW |