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

Side by Side Diff: chrome/browser/chromeos/drive/drive_integration_service.cc

Issue 2728323002: Network traffic annotation added to drive/base_requests. (Closed)
Patch Set: NOT_ANNOTATED_YET tag updated. 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 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 "chrome/browser/chromeos/drive/drive_integration_service.h" 5 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_enumerator.h" 8 #include "base/files/file_enumerator.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "components/prefs/pref_change_registrar.h" 44 #include "components/prefs/pref_change_registrar.h"
45 #include "components/prefs/pref_service.h" 45 #include "components/prefs/pref_service.h"
46 #include "components/signin/core/browser/profile_oauth2_token_service.h" 46 #include "components/signin/core/browser/profile_oauth2_token_service.h"
47 #include "components/signin/core/browser/signin_manager.h" 47 #include "components/signin/core/browser/signin_manager.h"
48 #include "components/version_info/version_info.h" 48 #include "components/version_info/version_info.h"
49 #include "content/public/browser/browser_context.h" 49 #include "content/public/browser/browser_context.h"
50 #include "content/public/browser/browser_thread.h" 50 #include "content/public/browser/browser_thread.h"
51 #include "content/public/browser/notification_service.h" 51 #include "content/public/browser/notification_service.h"
52 #include "content/public/common/user_agent.h" 52 #include "content/public/common/user_agent.h"
53 #include "google_apis/drive/auth_service.h" 53 #include "google_apis/drive/auth_service.h"
54 #include "net/traffic_annotation/network_traffic_annotation.h"
54 #include "storage/browser/fileapi/external_mount_points.h" 55 #include "storage/browser/fileapi/external_mount_points.h"
55 #include "ui/base/l10n/l10n_util.h" 56 #include "ui/base/l10n/l10n_util.h"
56 57
57 using content::BrowserContext; 58 using content::BrowserContext;
58 using content::BrowserThread; 59 using content::BrowserThread;
59 60
60 namespace drive { 61 namespace drive {
61 namespace { 62 namespace {
62 63
63 // Name of the directory used to store metadata. 64 // Name of the directory used to store metadata.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); 258 ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
258 259
259 if (test_drive_service) { 260 if (test_drive_service) {
260 drive_service_.reset(test_drive_service); 261 drive_service_.reset(test_drive_service);
261 } else { 262 } else {
262 drive_service_.reset(new DriveAPIService( 263 drive_service_.reset(new DriveAPIService(
263 oauth_service, g_browser_process->system_request_context(), 264 oauth_service, g_browser_process->system_request_context(),
264 blocking_task_runner_.get(), 265 blocking_task_runner_.get(),
265 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction), 266 GURL(google_apis::DriveApiUrlGenerator::kBaseUrlForProduction),
266 GURL(google_apis::DriveApiUrlGenerator::kBaseThumbnailUrlForProduction), 267 GURL(google_apis::DriveApiUrlGenerator::kBaseThumbnailUrlForProduction),
267 GetDriveUserAgent())); 268 GetDriveUserAgent(), NO_TRAFFIC_ANNOTATION_YET));
268 } 269 }
269 scheduler_.reset(new JobScheduler( 270 scheduler_.reset(new JobScheduler(
270 profile_->GetPrefs(), 271 profile_->GetPrefs(),
271 logger_.get(), 272 logger_.get(),
272 drive_service_.get(), 273 drive_service_.get(),
273 blocking_task_runner_.get())); 274 blocking_task_runner_.get()));
274 metadata_storage_.reset(new internal::ResourceMetadataStorage( 275 metadata_storage_.reset(new internal::ResourceMetadataStorage(
275 cache_root_directory_.Append(kMetadataDirectory), 276 cache_root_directory_.Append(kMetadataDirectory),
276 blocking_task_runner_.get())); 277 blocking_task_runner_.get()));
277 cache_.reset(new internal::FileCache( 278 cache_.reset(new internal::FileCache(
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 profile, preference_watcher, 667 profile, preference_watcher,
667 NULL, std::string(), base::FilePath(), NULL); 668 NULL, std::string(), base::FilePath(), NULL);
668 } else { 669 } else {
669 service = factory_for_test_->Run(profile); 670 service = factory_for_test_->Run(profile);
670 } 671 }
671 672
672 return service; 673 return service;
673 } 674 }
674 675
675 } // namespace drive 676 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698