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

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

Issue 15686007: Remove Activity Log usage of Extension objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made TODO wording more clear 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 "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 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 if (!extension_service) { 1540 if (!extension_service) {
1541 LOG(WARNING) << "ExtensionService does not seem to be available " 1541 LOG(WARNING) << "ExtensionService does not seem to be available "
1542 << "(this may be normal for unit tests)"; 1542 << "(this may be normal for unit tests)";
1543 } else { 1543 } else {
1544 const Extension* extension = 1544 const Extension* extension =
1545 extension_service->extensions()->GetByID(extension_id); 1545 extension_service->extensions()->GetByID(extension_id);
1546 if (!extension) { 1546 if (!extension) {
1547 LOG(WARNING) << "Extension " << extension_id << " not found!"; 1547 LOG(WARNING) << "Extension " << extension_id << " not found!";
1548 } else { 1548 } else {
1549 extensions::ActivityLog::GetInstance(profile)->LogWebRequestAction( 1549 extensions::ActivityLog::GetInstance(profile)->LogWebRequestAction(
1550 extension, 1550 extension->id(),
1551 url, 1551 url,
1552 api_call, 1552 api_call,
1553 details.Pass(), 1553 details.Pass(),
1554 ""); 1554 "");
1555 } 1555 }
1556 } 1556 }
1557 } 1557 }
1558 } 1558 }
1559 1559
1560 } // namespace 1560 } // namespace
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 } else if ((*it)->name().find("AdBlock") != std::string::npos) { 2185 } else if ((*it)->name().find("AdBlock") != std::string::npos) {
2186 adblock = true; 2186 adblock = true;
2187 } else { 2187 } else {
2188 other = true; 2188 other = true;
2189 } 2189 }
2190 } 2190 }
2191 } 2191 }
2192 2192
2193 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other)); 2193 host->Send(new ExtensionMsg_UsingWebRequestAPI(adblock, adblock_plus, other));
2194 } 2194 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698