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

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

Issue 1272373003: Add extension event histogram values for messaging, webRequest, and webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_
6 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ 6 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 const std::string& extension_id, 264 const std::string& extension_id,
265 const std::string& event_name, 265 const std::string& event_name,
266 const std::string& sub_event_name, 266 const std::string& sub_event_name,
267 uint64 request_id, 267 uint64 request_id,
268 EventResponse* response); 268 EventResponse* response);
269 269
270 // Adds a listener to the given event. |event_name| specifies the event being 270 // Adds a listener to the given event. |event_name| specifies the event being
271 // listened to. |sub_event_name| is an internal event uniquely generated in 271 // listened to. |sub_event_name| is an internal event uniquely generated in
272 // the extension process to correspond to the given filter and 272 // the extension process to correspond to the given filter and
273 // extra_info_spec. It returns true on success, false on failure. 273 // extra_info_spec. It returns true on success, false on failure.
274 bool AddEventListener( 274 bool AddEventListener(void* browser_context,
275 void* browser_context, 275 const std::string& extension_id,
276 const std::string& extension_id, 276 const std::string& extension_name,
277 const std::string& extension_name, 277 events::HistogramValue histogram_value,
278 const std::string& event_name, 278 const std::string& event_name,
279 const std::string& sub_event_name, 279 const std::string& sub_event_name,
280 const RequestFilter& filter, 280 const RequestFilter& filter,
281 int extra_info_spec, 281 int extra_info_spec,
282 int embedder_process_id, 282 int embedder_process_id,
283 int web_view_instance_id, 283 int web_view_instance_id,
284 base::WeakPtr<IPC::Sender> ipc_sender); 284 base::WeakPtr<IPC::Sender> ipc_sender);
285 285
286 // Removes the listener for the given sub-event. 286 // Removes the listener for the given sub-event.
287 void RemoveEventListener( 287 void RemoveEventListener(
288 void* browser_context, 288 void* browser_context,
289 const std::string& extension_id, 289 const std::string& extension_id,
290 const std::string& sub_event_name, 290 const std::string& sub_event_name,
291 int embedder_process_id, 291 int embedder_process_id,
292 int web_view_instance_id); 292 int web_view_instance_id);
293 293
294 // Removes the listeners for a given <webview>. 294 // Removes the listeners for a given <webview>.
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 extensions::QuotaLimitHeuristics* heuristics) const override; 550 extensions::QuotaLimitHeuristics* heuristics) const override;
551 // Handle quota exceeded gracefully: Only warn the user but still execute the 551 // Handle quota exceeded gracefully: Only warn the user but still execute the
552 // function. 552 // function.
553 void OnQuotaExceeded(const std::string& error) override; 553 void OnQuotaExceeded(const std::string& error) override;
554 bool RunSync() override; 554 bool RunSync() override;
555 }; 555 };
556 556
557 } // namespace extensions 557 } // namespace extensions
558 558
559 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ 559 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698