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

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

Issue 2077723002: [Extensions] Short-circuit activity logging if not enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Test Created 4 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // count reaches 0, we stop blocking the request and proceed it using the 365 // count reaches 0, we stop blocking the request and proceed it using the
366 // method requested by the extension with the highest precedence. Precedence 366 // method requested by the extension with the highest precedence. Precedence
367 // is decided by extension install time. If |response| is non-NULL, this 367 // is decided by extension install time. If |response| is non-NULL, this
368 // method assumes ownership. 368 // method assumes ownership.
369 void DecrementBlockCount(void* browser_context, 369 void DecrementBlockCount(void* browser_context,
370 const std::string& extension_id, 370 const std::string& extension_id,
371 const std::string& event_name, 371 const std::string& event_name,
372 uint64_t request_id, 372 uint64_t request_id,
373 EventResponse* response); 373 EventResponse* response);
374 374
375 // Logs an extension action.
376 void LogExtensionActivity(void* browser_context_id,
377 bool is_incognito,
378 const std::string& extension_id,
379 const GURL& url,
380 const std::string& api_call,
381 std::unique_ptr<base::DictionaryValue> details);
382
383 // Processes the generated deltas from blocked_requests_ on the specified 375 // Processes the generated deltas from blocked_requests_ on the specified
384 // request. If |call_back| is true, the callback registered in 376 // request. If |call_back| is true, the callback registered in
385 // |blocked_requests_| is called. 377 // |blocked_requests_| is called.
386 // The function returns the error code for the network request. This is 378 // The function returns the error code for the network request. This is
387 // mostly relevant in case the caller passes |call_callback| = false 379 // mostly relevant in case the caller passes |call_callback| = false
388 // and wants to return the correct network error code himself. 380 // and wants to return the correct network error code himself.
389 int ExecuteDeltas(void* browser_context, 381 int ExecuteDeltas(void* browser_context,
390 uint64_t request_id, 382 uint64_t request_id,
391 bool call_callback); 383 bool call_callback);
392 384
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 extensions::QuotaLimitHeuristics* heuristics) const override; 535 extensions::QuotaLimitHeuristics* heuristics) const override;
544 // Handle quota exceeded gracefully: Only warn the user but still execute the 536 // Handle quota exceeded gracefully: Only warn the user but still execute the
545 // function. 537 // function.
546 void OnQuotaExceeded(const std::string& error) override; 538 void OnQuotaExceeded(const std::string& error) override;
547 bool RunSync() override; 539 bool RunSync() override;
548 }; 540 };
549 541
550 } // namespace extensions 542 } // namespace extensions
551 543
552 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_ 544 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_API_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/extensions_api_client.cc ('k') | extensions/browser/api/web_request/web_request_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698