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

Unified Diff: google_apis/drive/request_sender.h

Issue 2728323002: Network traffic annotation added to drive/base_requests. (Closed)
Patch Set: Annoatation udpated. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/drive/files_list_request_runner_unittest.cc ('k') | google_apis/drive/request_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/request_sender.h
diff --git a/google_apis/drive/request_sender.h b/google_apis/drive/request_sender.h
index 6fb7437a00690d5d66a9b34f3e460648ca2a364d..c5705e6a5905c9d18ee9954aa74703be920fcf3c 100644
--- a/google_apis/drive/request_sender.h
+++ b/google_apis/drive/request_sender.h
@@ -15,6 +15,7 @@
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "google_apis/drive/drive_api_error_codes.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
namespace base {
class SequencedTaskRunner;
@@ -48,7 +49,8 @@ class RequestSender {
AuthServiceInterface* auth_service,
net::URLRequestContextGetter* url_request_context_getter,
const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner,
- const std::string& custom_user_agent);
+ const std::string& custom_user_agent,
+ const net::NetworkTrafficAnnotationTag& traffic_annotation);
~RequestSender();
AuthServiceInterface* auth_service() { return auth_service_.get(); }
@@ -74,6 +76,11 @@ class RequestSender {
// TODO(kinaba): refactor the life time management and make this at private.
void RequestFinished(AuthenticatedRequestInterface* request);
+ // Returns traffic annotation tag asssigned to this object.
+ const net::NetworkTrafficAnnotationTag& get_traffic_annotation_tag() const {
+ return traffic_annotation_;
+ }
+
private:
base::Closure StartRequestWithAuthRetryInternal(
AuthenticatedRequestInterface* request);
@@ -102,6 +109,8 @@ class RequestSender {
base::ThreadChecker thread_checker_;
+ const net::NetworkTrafficAnnotationTag traffic_annotation_;
+
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<RequestSender> weak_ptr_factory_;
« no previous file with comments | « google_apis/drive/files_list_request_runner_unittest.cc ('k') | google_apis/drive/request_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698