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

Side by Side Diff: content/browser/devtools/devtools_netlog_observer.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
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 #include "content/browser/devtools/devtools_netlog_observer.h" 5 #include "content/browser/devtools/devtools_netlog_observer.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/public/browser/content_browser_client.h" 10 #include "content/public/browser/content_browser_client.h"
(...skipping 14 matching lines...) Expand all
25 DevToolsNetLogObserver::DevToolsNetLogObserver() { 25 DevToolsNetLogObserver::DevToolsNetLogObserver() {
26 } 26 }
27 27
28 DevToolsNetLogObserver::~DevToolsNetLogObserver() { 28 DevToolsNetLogObserver::~DevToolsNetLogObserver() {
29 } 29 }
30 30
31 DevToolsNetLogObserver::ResourceInfo* 31 DevToolsNetLogObserver::ResourceInfo*
32 DevToolsNetLogObserver::GetResourceInfo(uint32 id) { 32 DevToolsNetLogObserver::GetResourceInfo(uint32 id) {
33 RequestToInfoMap::iterator it = request_to_info_.find(id); 33 RequestToInfoMap::iterator it = request_to_info_.find(id);
34 if (it != request_to_info_.end()) 34 if (it != request_to_info_.end())
35 return it->second; 35 return it->second.get();
36 return NULL; 36 return NULL;
37 } 37 }
38 38
39 void DevToolsNetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) { 39 void DevToolsNetLogObserver::OnAddEntry(const net::NetLog::Entry& entry) {
40 // The events that the Observer is interested in only occur on the IO thread. 40 // The events that the Observer is interested in only occur on the IO thread.
41 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) 41 if (!BrowserThread::CurrentlyOn(BrowserThread::IO))
42 return; 42 return;
43 43
44 if (entry.source().type == net::NetLog::SOURCE_URL_REQUEST) 44 if (entry.source().type == net::NetLog::SOURCE_URL_REQUEST)
45 OnAddURLRequestEntry(entry); 45 OnAddURLRequestEntry(entry);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 dev_tools_net_log_observer->request_to_encoded_data_length_.find( 319 dev_tools_net_log_observer->request_to_encoded_data_length_.find(
320 source_id); 320 source_id);
321 if (it == dev_tools_net_log_observer->request_to_encoded_data_length_.end()) 321 if (it == dev_tools_net_log_observer->request_to_encoded_data_length_.end())
322 return -1; 322 return -1;
323 int encoded_data_length = it->second; 323 int encoded_data_length = it->second;
324 it->second = 0; 324 it->second = 0;
325 return encoded_data_length; 325 return encoded_data_length;
326 } 326 }
327 327
328 } // namespace content 328 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_manager_unittest.cc ('k') | content/browser/devtools/tethering_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698