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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_protocol_handler.cc

Issue 10828385: Rename DocumentsServiceInterface to DriveServiceInterface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. Created 8 years, 4 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 | 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/chromeos/gdata/gdata_protocol_handler.h" 5 #include "chrome/browser/chromeos/gdata/gdata_protocol_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/string_number_conversions.h" 15 #include "base/string_number_conversions.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/threading/sequenced_worker_pool.h" 17 #include "base/threading/sequenced_worker_pool.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "chrome/browser/chromeos/gdata/documents_service_interface.h" 19 #include "chrome/browser/chromeos/gdata/drive_service_interface.h"
20 #include "chrome/browser/chromeos/gdata/gdata.pb.h" 20 #include "chrome/browser/chromeos/gdata/gdata.pb.h"
21 #include "chrome/browser/chromeos/gdata/gdata_directory_service.h" 21 #include "chrome/browser/chromeos/gdata/gdata_directory_service.h"
22 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" 22 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h"
23 #include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h" 23 #include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
24 #include "chrome/browser/chromeos/gdata/gdata_operation_registry.h" 24 #include "chrome/browser/chromeos/gdata/gdata_operation_registry.h"
25 #include "chrome/browser/chromeos/gdata/gdata_system_service.h" 25 #include "chrome/browser/chromeos/gdata/gdata_system_service.h"
26 #include "chrome/browser/chromeos/gdata/gdata_util.h" 26 #include "chrome/browser/chromeos/gdata/gdata_util.h"
27 #include "chrome/browser/chromeos/gdata/gdata_wapi_service.h"
kochi 2012/08/21 02:34:51 Looks like an unnecessary header sneaked in during
27 #include "chrome/browser/profiles/profile.h" 28 #include "chrome/browser/profiles/profile.h"
28 #include "chrome/browser/profiles/profile_manager.h" 29 #include "chrome/browser/profiles/profile_manager.h"
29 #include "chrome/common/url_constants.h" 30 #include "chrome/common/url_constants.h"
30 #include "content/public/browser/browser_thread.h" 31 #include "content/public/browser/browser_thread.h"
31 #include "net/base/escape.h" 32 #include "net/base/escape.h"
32 #include "net/base/file_stream.h" 33 #include "net/base/file_stream.h"
33 #include "net/base/net_errors.h" 34 #include "net/base/net_errors.h"
34 #include "net/http/http_request_headers.h" 35 #include "net/http/http_request_headers.h"
35 #include "net/http/http_response_headers.h" 36 #include "net/http/http_response_headers.h"
36 #include "net/http/http_response_info.h" 37 #include "net/http/http_response_info.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Helper function to get GDataFileSystem from Profile on UI thread. 116 // Helper function to get GDataFileSystem from Profile on UI thread.
116 void GetFileSystemOnUIThread(GDataFileSystemInterface** file_system) { 117 void GetFileSystemOnUIThread(GDataFileSystemInterface** file_system) {
117 GDataSystemService* system_service = GetSystemService(); 118 GDataSystemService* system_service = GetSystemService();
118 *file_system = system_service ? system_service->file_system() : NULL; 119 *file_system = system_service ? system_service->file_system() : NULL;
119 } 120 }
120 121
121 // Helper function to cancel GData download operation on UI thread. 122 // Helper function to cancel GData download operation on UI thread.
122 void CancelGDataDownloadOnUIThread(const FilePath& gdata_file_path) { 123 void CancelGDataDownloadOnUIThread(const FilePath& gdata_file_path) {
123 GDataSystemService* system_service = GetSystemService(); 124 GDataSystemService* system_service = GetSystemService();
124 if (system_service) 125 if (system_service)
125 system_service->docs_service()->operation_registry()->CancelForFilePath( 126 system_service->drive_service()->operation_registry()->CancelForFilePath(
126 gdata_file_path); 127 gdata_file_path);
127 } 128 }
128 129
129 // GDataURLRequesetJob is the gateway between network-level drive://... 130 // GDataURLRequesetJob is the gateway between network-level drive://...
130 // requests for gdata resources and GDataFileSytem. It exposes content URLs 131 // requests for gdata resources and GDataFileSytem. It exposes content URLs
131 // formatted as drive://<resource-id>. 132 // formatted as drive://<resource-id>.
132 class GDataURLRequestJob : public net::URLRequestJob { 133 class GDataURLRequestJob : public net::URLRequestJob {
133 public: 134 public:
134 explicit GDataURLRequestJob(net::URLRequest* request); 135 explicit GDataURLRequestJob(net::URLRequest* request);
135 136
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 GDataProtocolHandler::~GDataProtocolHandler() { 935 GDataProtocolHandler::~GDataProtocolHandler() {
935 } 936 }
936 937
937 net::URLRequestJob* GDataProtocolHandler::MaybeCreateJob( 938 net::URLRequestJob* GDataProtocolHandler::MaybeCreateJob(
938 net::URLRequest* request) const { 939 net::URLRequest* request) const {
939 DVLOG(1) << "Handling url: " << request->url().spec(); 940 DVLOG(1) << "Handling url: " << request->url().spec();
940 return new GDataURLRequestJob(request); 941 return new GDataURLRequestJob(request);
941 } 942 }
942 943
943 } // namespace gdata 944 } // namespace gdata
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698