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

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

Issue 2442213003: Remove dead extensions tracking code. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 (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 "extensions/browser/api/web_request/web_request_api.h" 5 #include "extensions/browser/api/web_request/web_request_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2141 bool success = 2141 bool success =
2142 ExtensionWebRequestEventRouter::GetInstance()->AddEventListener( 2142 ExtensionWebRequestEventRouter::GetInstance()->AddEventListener(
2143 profile_id(), extension_id_safe(), extension_name, 2143 profile_id(), extension_id_safe(), extension_name,
2144 GetEventHistogramValue(event_name), event_name, sub_event_name, 2144 GetEventHistogramValue(event_name), event_name, sub_event_name,
2145 filter, extra_info_spec, embedder_process_id, web_view_instance_id, 2145 filter, extra_info_spec, embedder_process_id, web_view_instance_id,
2146 ipc_sender_weak()); 2146 ipc_sender_weak());
2147 EXTENSION_FUNCTION_VALIDATE(success); 2147 EXTENSION_FUNCTION_VALIDATE(success);
2148 2148
2149 helpers::ClearCacheOnNavigation(); 2149 helpers::ClearCacheOnNavigation();
2150 2150
2151 if (!extension_id_safe().empty()) {
2152 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
2153 base::Bind(&helpers::NotifyWebRequestAPIUsed,
2154 profile_id(), extension_id_safe()));
2155 }
2156
2157 return RespondNow(NoArguments()); 2151 return RespondNow(NoArguments());
2158 } 2152 }
2159 2153
2160 void WebRequestInternalEventHandledFunction::OnError( 2154 void WebRequestInternalEventHandledFunction::OnError(
2161 const std::string& event_name, 2155 const std::string& event_name,
2162 const std::string& sub_event_name, 2156 const std::string& sub_event_name,
2163 uint64_t request_id, 2157 uint64_t request_id,
2164 std::unique_ptr<ExtensionWebRequestEventRouter::EventResponse> response) { 2158 std::unique_ptr<ExtensionWebRequestEventRouter::EventResponse> response) {
2165 ExtensionWebRequestEventRouter::GetInstance()->OnEventHandled( 2159 ExtensionWebRequestEventRouter::GetInstance()->OnEventHandled(
2166 profile_id(), 2160 profile_id(),
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 // Since EventListeners are segmented by browser_context, check that 2354 // Since EventListeners are segmented by browser_context, check that
2361 // last, as it is exceedingly unlikely to be different. 2355 // last, as it is exceedingly unlikely to be different.
2362 return extension_id == that.extension_id && 2356 return extension_id == that.extension_id &&
2363 sub_event_name == that.sub_event_name && 2357 sub_event_name == that.sub_event_name &&
2364 web_view_instance_id == that.web_view_instance_id && 2358 web_view_instance_id == that.web_view_instance_id &&
2365 embedder_process_id == that.embedder_process_id && 2359 embedder_process_id == that.embedder_process_id &&
2366 browser_context == that.browser_context; 2360 browser_context == that.browser_context;
2367 } 2361 }
2368 2362
2369 } // namespace extensions 2363 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698