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/create_file.h" | 5 #include "chrome/browser/chromeos/file_system_provider/operations/create_file.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "chrome/common/extensions/api/file_system_provider.h" | 9 #include "chrome/common/extensions/api/file_system_provider.h" |
10 #include "chrome/common/extensions/api/file_system_provider_internal.h" | 10 #include "chrome/common/extensions/api/file_system_provider_internal.h" |
11 | 11 |
12 namespace chromeos { | 12 namespace chromeos { |
13 namespace file_system_provider { | 13 namespace file_system_provider { |
14 namespace operations { | 14 namespace operations { |
15 | 15 |
16 CreateFile::CreateFile(extensions::EventRouter* event_router, | 16 CreateFile::CreateFile(extensions::EventRouter* event_router, |
17 const ProvidedFileSystemInfo& file_system_info, | 17 const ProvidedFileSystemInfo& file_system_info, |
18 const base::FilePath& file_path, | 18 const base::FilePath& file_path, |
19 const fileapi::AsyncFileUtil::StatusCallback& callback) | 19 const storage::AsyncFileUtil::StatusCallback& callback) |
20 : Operation(event_router, file_system_info), | 20 : Operation(event_router, file_system_info), |
21 file_path_(file_path), | 21 file_path_(file_path), |
22 callback_(callback) { | 22 callback_(callback) { |
23 } | 23 } |
24 | 24 |
25 CreateFile::~CreateFile() { | 25 CreateFile::~CreateFile() { |
26 } | 26 } |
27 | 27 |
28 bool CreateFile::Execute(int request_id) { | 28 bool CreateFile::Execute(int request_id) { |
29 if (!file_system_info_.writable()) | 29 if (!file_system_info_.writable()) |
(...skipping 16 matching lines...) Expand all Loading... |
46 | 46 |
47 void CreateFile::OnError(int /* request_id */, | 47 void CreateFile::OnError(int /* request_id */, |
48 scoped_ptr<RequestValue> /* result */, | 48 scoped_ptr<RequestValue> /* result */, |
49 base::File::Error error) { | 49 base::File::Error error) { |
50 callback_.Run(error); | 50 callback_.Run(error); |
51 } | 51 } |
52 | 52 |
53 } // namespace operations | 53 } // namespace operations |
54 } // namespace file_system_provider | 54 } // namespace file_system_provider |
55 } // namespace chromeos | 55 } // namespace chromeos |
OLD | NEW |