OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_file_stream_reader.h" | 5 #include "chrome/browser/chromeos/drive/drive_file_stream_reader.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstring> | 8 #include <cstring> |
9 | 9 |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/sequenced_task_runner.h" | 12 #include "base/sequenced_task_runner.h" |
13 #include "chrome/browser/chromeos/drive/file_system_interface.h" | 13 #include "chrome/browser/chromeos/drive/file_system_interface.h" |
14 #include "chrome/browser/chromeos/drive/local_file_reader.h" | |
15 #include "components/drive/drive.pb.h" | 14 #include "components/drive/drive.pb.h" |
| 15 #include "components/drive/local_file_reader.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 #include "google_apis/drive/task_util.h" | 17 #include "google_apis/drive/task_util.h" |
18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
20 #include "net/http/http_byte_range.h" | 20 #include "net/http/http_byte_range.h" |
21 | 21 |
22 using content::BrowserThread; | 22 using content::BrowserThread; |
23 | 23 |
24 namespace drive { | 24 namespace drive { |
25 namespace { | 25 namespace { |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 // Note: due to the same reason, LocalReaderProxy::OnCompleted may | 480 // Note: due to the same reason, LocalReaderProxy::OnCompleted may |
481 // or may not be called. This is timing issue, and it is difficult to avoid | 481 // or may not be called. This is timing issue, and it is difficult to avoid |
482 // unfortunately. | 482 // unfortunately. |
483 if (error != FILE_ERROR_OK) { | 483 if (error != FILE_ERROR_OK) { |
484 callback.Run(FileErrorToNetError(error), scoped_ptr<ResourceEntry>()); | 484 callback.Run(FileErrorToNetError(error), scoped_ptr<ResourceEntry>()); |
485 } | 485 } |
486 } | 486 } |
487 } | 487 } |
488 | 488 |
489 } // namespace drive | 489 } // namespace drive |
OLD | NEW |