OLD | NEW |
---|---|
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_uploader.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_uploader.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "chrome/browser/chromeos/gdata/drive_service_interface.h" | 11 #include "chrome/browser/chromeos/gdata/drive_service_interface.h" |
12 #include "chrome/browser/chromeos/gdata/gdata_directory_service.h" | 12 #include "chrome/browser/chromeos/gdata/gdata_directory_service.h" |
13 #include "chrome/browser/chromeos/gdata/gdata_upload_file_info.h" | 13 #include "chrome/browser/chromeos/gdata/gdata_upload_file_info.h" |
14 #include "chrome/browser/chromeos/gdata/gdata_wapi_parser.h" | 14 #include "chrome/browser/chromeos/gdata/gdata_wapi_parser.h" |
15 #include "chrome/browser/chromeos/gdata/gdata_wapi_service.h" | |
kochi
2012/08/21 05:09:23
Removed.
| |
15 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
16 #include "content/public/browser/download_item.h" | 17 #include "content/public/browser/download_item.h" |
17 #include "net/base/file_stream.h" | 18 #include "net/base/file_stream.h" |
18 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
19 | 20 |
20 using content::BrowserThread; | 21 using content::BrowserThread; |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 // Google Documents List API requires uploading in chunks of 512kB. | 25 // Google Documents List API requires uploading in chunks of 512kB. |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 if (!callback.is_null()) | 454 if (!callback.is_null()) |
454 callback.Run(error, upload_file_info.Pass()); | 455 callback.Run(error, upload_file_info.Pass()); |
455 } | 456 } |
456 | 457 |
457 void GDataUploader::RemoveUpload(int upload_id) { | 458 void GDataUploader::RemoveUpload(int upload_id) { |
458 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 459 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
459 pending_uploads_.erase(upload_id); | 460 pending_uploads_.erase(upload_id); |
460 } | 461 } |
461 | 462 |
462 } // namespace gdata | 463 } // namespace gdata |
OLD | NEW |