OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/file_system_provider/operations/read_file.h" | 5 #include "chrome/browser/chromeos/file_system_provider/operations/read_file.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/debug/trace_event.h" | |
11 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| 11 #include "base/trace_event/trace_event.h" |
12 #include "chrome/common/extensions/api/file_system_provider.h" | 12 #include "chrome/common/extensions/api/file_system_provider.h" |
13 #include "chrome/common/extensions/api/file_system_provider_internal.h" | 13 #include "chrome/common/extensions/api/file_system_provider_internal.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 namespace file_system_provider { | 16 namespace file_system_provider { |
17 namespace operations { | 17 namespace operations { |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Convert |value| into |output|. If parsing fails, then returns a negative | 20 // Convert |value| into |output|. If parsing fails, then returns a negative |
21 // value. Otherwise returns number of bytes written to the buffer. | 21 // value. Otherwise returns number of bytes written to the buffer. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 void ReadFile::OnError(int /* request_id */, | 104 void ReadFile::OnError(int /* request_id */, |
105 scoped_ptr<RequestValue> /* result */, | 105 scoped_ptr<RequestValue> /* result */, |
106 base::File::Error error) { | 106 base::File::Error error) { |
107 TRACE_EVENT0("file_system_provider", "ReadFile::OnError"); | 107 TRACE_EVENT0("file_system_provider", "ReadFile::OnError"); |
108 callback_.Run(0 /* chunk_length */, false /* has_more */, error); | 108 callback_.Run(0 /* chunk_length */, false /* has_more */, error); |
109 } | 109 } |
110 | 110 |
111 } // namespace operations | 111 } // namespace operations |
112 } // namespace file_system_provider | 112 } // namespace file_system_provider |
113 } // namespace chromeos | 113 } // namespace chromeos |
OLD | NEW |