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

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: Improving the naming of source_sets in gn files. 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 18 matching lines...) Expand all
29 29
30 // Notifies the extensions::ProcessManager that a request has started or stopped 30 // Notifies the extensions::ProcessManager that a request has started or stopped
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())
40 return;
39 if (!g_browser_process->profile_manager()->IsValidProfile(profile)) 41 if (!g_browser_process->profile_manager()->IsValidProfile(profile))
40 return; 42 return;
41 43
42 extensions::ProcessManager* process_manager = 44 extensions::ProcessManager* process_manager =
43 extensions::ProcessManager::Get(profile); 45 extensions::ProcessManager::Get(profile);
44 DCHECK(process_manager); 46 DCHECK(process_manager);
45 47
46 // Will be NULL if the request was not issued on behalf of a renderer (e.g. a 48 // Will be NULL if the request was not issued on behalf of a renderer (e.g. a
47 // system-level request). 49 // system-level request).
48 content::RenderFrameHost* render_frame_host = 50 content::RenderFrameHost* render_frame_host =
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 } 348 }
347 349
348 net::NetworkDelegate::AuthRequiredResponse 350 net::NetworkDelegate::AuthRequiredResponse
349 ChromeExtensionsNetworkDelegate::OnAuthRequired( 351 ChromeExtensionsNetworkDelegate::OnAuthRequired(
350 net::URLRequest* request, 352 net::URLRequest* request,
351 const net::AuthChallengeInfo& auth_info, 353 const net::AuthChallengeInfo& auth_info,
352 const AuthCallback& callback, 354 const AuthCallback& callback,
353 net::AuthCredentials* credentials) { 355 net::AuthCredentials* credentials) {
354 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; 356 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
355 } 357 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698