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

Unified Diff: components/drive/service/drive_api_service.cc

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
Index: components/drive/service/drive_api_service.cc
diff --git a/components/drive/service/drive_api_service.cc b/components/drive/service/drive_api_service.cc
index b630803b247d930dfaebd7700ed444a0e35f473b..189baa3b217df139225cb0c5dc1fb382f12333ab 100644
--- a/components/drive/service/drive_api_service.cc
+++ b/components/drive/service/drive_api_service.cc
@@ -254,14 +254,16 @@ DriveAPIService::DriveAPIService(
base::SequencedTaskRunner* blocking_task_runner,
const GURL& base_url,
const GURL& base_thumbnail_url,
- const std::string& custom_user_agent)
+ const std::string& custom_user_agent,
+ const net::NetworkTrafficAnnotationTag& traffic_annotation)
: oauth2_token_service_(oauth2_token_service),
url_request_context_getter_(url_request_context_getter),
blocking_task_runner_(blocking_task_runner),
- url_generator_(base_url, base_thumbnail_url,
+ url_generator_(base_url,
+ base_thumbnail_url,
google_apis::GetTeamDrivesIntegrationSwitch()),
- custom_user_agent_(custom_user_agent) {
-}
+ custom_user_agent_(custom_user_agent),
+ traffic_annotation_(traffic_annotation) {}
DriveAPIService::~DriveAPIService() {
DCHECK(thread_checker_.CalledOnValidThread());
@@ -283,13 +285,10 @@ void DriveAPIService::Initialize(const std::string& account_id) {
scopes.push_back(kDocsListScope);
sender_.reset(new RequestSender(
- new google_apis::AuthService(oauth2_token_service_,
- account_id,
- url_request_context_getter_.get(),
- scopes),
- url_request_context_getter_.get(),
- blocking_task_runner_.get(),
- custom_user_agent_));
+ new google_apis::AuthService(oauth2_token_service_, account_id,
+ url_request_context_getter_.get(), scopes),
+ url_request_context_getter_.get(), blocking_task_runner_.get(),
+ custom_user_agent_, traffic_annotation_));
sender_->auth_service()->AddObserver(this);
files_list_request_runner_.reset(
« no previous file with comments | « components/drive/service/drive_api_service.h ('k') | components/drive/service/drive_api_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698