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

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

Issue 10384086: Moved url_utils from chrome/browser/net to chrome/common/net. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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_documents_service.h" 5 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
11 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" 11 #include "chrome/browser/chromeos/gdata/gdata_file_system.h"
12 #include "chrome/browser/chromeos/gdata/gdata_operations.h" 12 #include "chrome/browser/chromeos/gdata/gdata_operations.h"
13 #include "chrome/browser/net/browser_url_util.h"
14 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/common/net/url_util.h"
15 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
16 16
17 using content::BrowserThread; 17 using content::BrowserThread;
18 18
19 namespace gdata { 19 namespace gdata {
20 20
21 namespace { 21 namespace {
22 22
23 const char* GetExportFormatParam(DocumentExportFormat format) { 23 const char* GetExportFormatParam(DocumentExportFormat format) {
24 switch (format) { 24 switch (format) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 const FilePath& virtual_path, 131 const FilePath& virtual_path,
132 const FilePath& local_cache_path, 132 const FilePath& local_cache_path,
133 const GURL& document_url, 133 const GURL& document_url,
134 DocumentExportFormat format, 134 DocumentExportFormat format,
135 const DownloadActionCallback& callback) { 135 const DownloadActionCallback& callback) {
136 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 136 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
137 137
138 DownloadFile( 138 DownloadFile(
139 virtual_path, 139 virtual_path,
140 local_cache_path, 140 local_cache_path,
141 chrome_browser_net::AppendQueryParameter(document_url, 141 chrome_common_net::AppendQueryParameter(document_url,
142 "exportFormat", 142 "exportFormat",
143 GetExportFormatParam(format)), 143 GetExportFormatParam(format)),
144 callback, 144 callback,
145 GetDownloadDataCallback()); 145 GetDownloadDataCallback());
146 } 146 }
147 147
148 void DocumentsService::DownloadFile( 148 void DocumentsService::DownloadFile(
149 const FilePath& virtual_path, 149 const FilePath& virtual_path,
150 const FilePath& local_cache_path, 150 const FilePath& local_cache_path,
151 const GURL& document_url, 151 const GURL& document_url,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 void DocumentsService::RetryOperation(GDataOperationInterface* operation) { 304 void DocumentsService::RetryOperation(GDataOperationInterface* operation) {
305 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 305 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
306 306
307 gdata_auth_service_->ClearOAuth2Token(); 307 gdata_auth_service_->ClearOAuth2Token();
308 // User authentication might have expired - rerun the request to force 308 // User authentication might have expired - rerun the request to force
309 // auth token refresh. 309 // auth token refresh.
310 StartOperation(operation); 310 StartOperation(operation);
311 } 311 }
312 312
313 } // namespace gdata 313 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.cc ('k') | chrome/browser/chromeos/gdata/gdata_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698