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

Unified Diff: content/browser/debugger/devtools_netlog_observer.h

Issue 11630004: DevTools: rename debugger/ to devtools/, move DevTools files into content/renderer/devtools. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: For landing Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/debugger/devtools_netlog_observer.h
diff --git a/content/browser/debugger/devtools_netlog_observer.h b/content/browser/debugger/devtools_netlog_observer.h
deleted file mode 100644
index 3306bc23fd4d94230a9e3eca3ad619dc9449b422..0000000000000000000000000000000000000000
--- a/content/browser/debugger/devtools_netlog_observer.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_NETLOG_OBSERVER_H_
-#define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_NETLOG_OBSERVER_H_
-
-#include "base/hash_tables.h"
-#include "base/memory/ref_counted.h"
-#include "net/base/net_log.h"
-#include "webkit/glue/resource_loader_bridge.h"
-
-namespace net {
-class URLRequest;
-} // namespace net
-
-namespace content {
-struct ResourceResponse;
-
-// DevToolsNetLogObserver watches the NetLog event stream and collects the
-// stuff that may be of interest to DevTools. Currently, this only includes
-// actual HTTP/SPDY headers sent and received over the network.
-//
-// As DevToolsNetLogObserver shares live data with objects that live on the
-// IO Thread, it must also reside on the IO Thread. Only OnAddEntry can be
-// called from other threads.
-class DevToolsNetLogObserver : public net::NetLog::ThreadSafeObserver {
- typedef webkit_glue::ResourceDevToolsInfo ResourceInfo;
-
- public:
- // net::NetLog::ThreadSafeObserver implementation:
- virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE;
-
- void OnAddURLRequestEntry(const net::NetLog::Entry& entry);
- void OnAddHTTPStreamJobEntry(const net::NetLog::Entry& entry);
- void OnAddSocketEntry(const net::NetLog::Entry& entry);
-
- static void Attach();
- static void Detach();
-
- // Must be called on the IO thread. May return NULL if no observers
- // are active.
- static DevToolsNetLogObserver* GetInstance();
- static void PopulateResponseInfo(net::URLRequest*,
- ResourceResponse*);
- static int GetAndResetEncodedDataLength(net::URLRequest* request);
-
- private:
- static DevToolsNetLogObserver* instance_;
-
- DevToolsNetLogObserver();
- virtual ~DevToolsNetLogObserver();
-
- ResourceInfo* GetResourceInfo(uint32 id);
-
- typedef base::hash_map<uint32, scoped_refptr<ResourceInfo> > RequestToInfoMap;
- typedef base::hash_map<uint32, int> RequestToEncodedDataLengthMap;
- typedef base::hash_map<uint32, uint32> HTTPStreamJobToSocketMap;
- typedef base::hash_map<uint32, uint32> SocketToRequestMap;
- RequestToInfoMap request_to_info_;
- RequestToEncodedDataLengthMap request_to_encoded_data_length_;
- HTTPStreamJobToSocketMap http_stream_job_to_socket_;
- SocketToRequestMap socket_to_request_;
-
- DISALLOW_COPY_AND_ASSIGN(DevToolsNetLogObserver);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_NETLOG_OBSERVER_H_
« no previous file with comments | « content/browser/debugger/devtools_manager_unittest.cc ('k') | content/browser/debugger/devtools_netlog_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698