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

Side by Side Diff: chrome/browser/net/chrome_extensions_network_delegate.cc

Issue 1279543002: Support needed to measure user and service traffic in Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewHistogram
Patch Set: Adding profileManager and fixing stack-use-after-return error. 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/net/chrome_extensions_network_delegate.h" 5 #include "chrome/browser/net/chrome_extensions_network_delegate.h"
6 6
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 8
9 #if defined(ENABLE_EXTENSIONS) 9 #if defined(ENABLE_EXTENSIONS)
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 20 matching lines...) Expand all
31 // for a particular RenderFrame. 31 // for a particular RenderFrame.
32 void NotifyEPMRequestStatus(RequestStatus status, 32 void NotifyEPMRequestStatus(RequestStatus status,
33 void* profile_id, 33 void* profile_id,
34 uint64 request_id, 34 uint64 request_id,
35 int process_id, 35 int process_id,
36 int render_frame_id) { 36 int render_frame_id) {
37 DCHECK_CURRENTLY_ON(BrowserThread::UI); 37 DCHECK_CURRENTLY_ON(BrowserThread::UI);
38 Profile* profile = reinterpret_cast<Profile*>(profile_id); 38 Profile* profile = reinterpret_cast<Profile*>(profile_id);
39 if (!g_browser_process->profile_manager()->IsValidProfile(profile)) 39 if (!g_browser_process->profile_manager()->IsValidProfile(profile))
40 return; 40 return;
41
42 extensions::ProcessManager* process_manager = 41 extensions::ProcessManager* process_manager =
43 extensions::ProcessManager::Get(profile); 42 extensions::ProcessManager::Get(profile);
44 DCHECK(process_manager); 43 DCHECK(process_manager);
45 44
46 // Will be NULL if the request was not issued on behalf of a renderer (e.g. a 45 // Will be NULL if the request was not issued on behalf of a renderer (e.g. a
47 // system-level request). 46 // system-level request).
48 content::RenderFrameHost* render_frame_host = 47 content::RenderFrameHost* render_frame_host =
49 content::RenderFrameHost::FromID(process_id, render_frame_id); 48 content::RenderFrameHost::FromID(process_id, render_frame_id);
50 if (render_frame_host) { 49 if (render_frame_host) {
51 if (status == REQUEST_STARTED) { 50 if (status == REQUEST_STARTED) {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 } 345 }
347 346
348 net::NetworkDelegate::AuthRequiredResponse 347 net::NetworkDelegate::AuthRequiredResponse
349 ChromeExtensionsNetworkDelegate::OnAuthRequired( 348 ChromeExtensionsNetworkDelegate::OnAuthRequired(
350 net::URLRequest* request, 349 net::URLRequest* request,
351 const net::AuthChallengeInfo& auth_info, 350 const net::AuthChallengeInfo& auth_info,
352 const AuthCallback& callback, 351 const AuthCallback& callback,
353 net::AuthCredentials* credentials) { 352 net::AuthCredentials* credentials) {
354 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; 353 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
355 } 354 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698