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

Side by Side Diff: chrome/browser/drive/drive_api_service.cc

Issue 63923002: net: Use SequencedTaskRunner for URLFetcherResponseWriter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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/drive/drive_api_service.h" 5 #include "chrome/browser/drive/drive_api_service.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "base/task_runner_util.h" 12 #include "base/task_runner_util.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/drive/drive_api_util.h" 14 #include "chrome/browser/drive/drive_api_util.h"
15 #include "chrome/browser/google_apis/auth_service.h" 15 #include "chrome/browser/google_apis/auth_service.h"
16 #include "chrome/browser/google_apis/drive_api_parser.h" 16 #include "chrome/browser/google_apis/drive_api_parser.h"
17 #include "chrome/browser/google_apis/drive_api_requests.h" 17 #include "chrome/browser/google_apis/drive_api_requests.h"
18 #include "chrome/browser/google_apis/gdata_errorcode.h" 18 #include "chrome/browser/google_apis/gdata_errorcode.h"
19 #include "chrome/browser/google_apis/gdata_wapi_parser.h" 19 #include "chrome/browser/google_apis/gdata_wapi_parser.h"
20 #include "chrome/browser/google_apis/gdata_wapi_requests.h" 20 #include "chrome/browser/google_apis/gdata_wapi_requests.h"
21 #include "chrome/browser/google_apis/request_sender.h" 21 #include "chrome/browser/google_apis/request_sender.h"
22 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
23 #include "net/url_request/url_request_context_getter.h" 23 #include "net/url_request/url_request_context_getter.h"
mmenke 2013/11/07 17:02:36 Don't we need sequenced_task_runner here, to incre
hashimoto 2013/11/08 04:08:17 This doesn't result in a compile error because con
24 24
25 using content::BrowserThread; 25 using content::BrowserThread;
26 using google_apis::AppList; 26 using google_apis::AppList;
27 using google_apis::AppListCallback; 27 using google_apis::AppListCallback;
28 using google_apis::AuthStatusCallback; 28 using google_apis::AuthStatusCallback;
29 using google_apis::AuthorizeAppCallback; 29 using google_apis::AuthorizeAppCallback;
30 using google_apis::CancelCallback; 30 using google_apis::CancelCallback;
31 using google_apis::ChangeList; 31 using google_apis::ChangeList;
32 using google_apis::DownloadActionCallback; 32 using google_apis::DownloadActionCallback;
33 using google_apis::EntryActionCallback; 33 using google_apis::EntryActionCallback;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 // The resource ID for the root directory for Drive API is defined in the spec: 276 // The resource ID for the root directory for Drive API is defined in the spec:
277 // https://developers.google.com/drive/folder 277 // https://developers.google.com/drive/folder
278 const char kDriveApiRootDirectoryResourceId[] = "root"; 278 const char kDriveApiRootDirectoryResourceId[] = "root";
279 279
280 } // namespace 280 } // namespace
281 281
282 DriveAPIService::DriveAPIService( 282 DriveAPIService::DriveAPIService(
283 OAuth2TokenService* oauth2_token_service, 283 OAuth2TokenService* oauth2_token_service,
284 net::URLRequestContextGetter* url_request_context_getter, 284 net::URLRequestContextGetter* url_request_context_getter,
285 base::TaskRunner* blocking_task_runner, 285 base::SequencedTaskRunner* blocking_task_runner,
286 const GURL& base_url, 286 const GURL& base_url,
287 const GURL& base_download_url, 287 const GURL& base_download_url,
288 const GURL& wapi_base_url, 288 const GURL& wapi_base_url,
289 const std::string& custom_user_agent) 289 const std::string& custom_user_agent)
290 : oauth2_token_service_(oauth2_token_service), 290 : oauth2_token_service_(oauth2_token_service),
291 url_request_context_getter_(url_request_context_getter), 291 url_request_context_getter_(url_request_context_getter),
292 blocking_task_runner_(blocking_task_runner), 292 blocking_task_runner_(blocking_task_runner),
293 url_generator_(base_url, base_download_url), 293 url_generator_(base_url, base_download_url),
294 wapi_url_generator_(wapi_base_url, base_download_url), 294 wapi_url_generator_(wapi_base_url, base_download_url),
295 custom_user_agent_(custom_user_agent) { 295 custom_user_agent_(custom_user_agent) {
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 if (CanSendRequest()) { 884 if (CanSendRequest()) {
885 FOR_EACH_OBSERVER( 885 FOR_EACH_OBSERVER(
886 DriveServiceObserver, observers_, OnReadyToSendRequests()); 886 DriveServiceObserver, observers_, OnReadyToSendRequests());
887 } else if (!HasRefreshToken()) { 887 } else if (!HasRefreshToken()) {
888 FOR_EACH_OBSERVER( 888 FOR_EACH_OBSERVER(
889 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); 889 DriveServiceObserver, observers_, OnRefreshTokenInvalid());
890 } 890 }
891 } 891 }
892 892
893 } // namespace drive 893 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698