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

Side by Side Diff: chrome/browser/extensions/api/web_request/web_request_api.cc

Issue 18430004: Sets correct ActivityLog enabled status to the first renderer process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 4 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 "chrome/browser/extensions/api/web_request/web_request_api.h" 5 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 return; 1665 return;
1666 1666
1667 BlockedRequest& blocked_request = blocked_requests_[request_id]; 1667 BlockedRequest& blocked_request = blocked_requests_[request_id];
1668 int num_handlers_blocking = --blocked_request.num_handlers_blocking; 1668 int num_handlers_blocking = --blocked_request.num_handlers_blocking;
1669 CHECK_GE(num_handlers_blocking, 0); 1669 CHECK_GE(num_handlers_blocking, 0);
1670 1670
1671 if (response) { 1671 if (response) {
1672 helpers::EventResponseDelta* delta = 1672 helpers::EventResponseDelta* delta =
1673 CalculateDelta(&blocked_request, response); 1673 CalculateDelta(&blocked_request, response);
1674 1674
1675 if (extensions::ActivityLog::IsLogEnabledOnAnyProfile()) { 1675 if (extensions::ActivityLog::MaybeLogEnabled()) {
felt 2013/08/08 17:49:24 You might as well keep the old name (IsLogEnabledO
pmarch 2013/08/12 20:43:53 Done.
1676 LogExtensionActivity(profile, 1676 LogExtensionActivity(profile,
1677 blocked_request.is_incognito, 1677 blocked_request.is_incognito,
1678 extension_id, 1678 extension_id,
1679 blocked_request.request->url(), 1679 blocked_request.request->url(),
1680 event_name, 1680 event_name,
1681 SummarizeResponseDelta(event_name, *delta)); 1681 SummarizeResponseDelta(event_name, *delta));
1682 } 1682 }
1683 1683
1684 blocked_request.response_deltas.push_back( 1684 blocked_request.response_deltas.push_back(
1685 linked_ptr<helpers::EventResponseDelta>(delta)); 1685 linked_ptr<helpers::EventResponseDelta>(delta));
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2294 } else if ((*it)->name().find("AdBlock") != std::string::npos) { 2294 } else if ((*it)->name().find("AdBlock") != std::string::npos) {
2295 adblock = true; 2295 adblock = true;
2296 } else { 2296 } else {
2297 other = true; 2297 other = true;
2298 } 2298 }
2299 } 2299 }
2300 } 2300 }
2301 2301
2302 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other)); 2302 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other));
2303 } 2303 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698