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/add_watcher.h" | 5 #include "chrome/browser/chromeos/file_system_provider/operations/add_watcher.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" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 return SendEvent( | 39 return SendEvent( |
40 request_id, | 40 request_id, |
41 extensions::events::FILE_SYSTEM_PROVIDER_ON_ADD_WATCHER_REQUESTED, | 41 extensions::events::FILE_SYSTEM_PROVIDER_ON_ADD_WATCHER_REQUESTED, |
42 extensions::api::file_system_provider::OnAddWatcherRequested::kEventName, | 42 extensions::api::file_system_provider::OnAddWatcherRequested::kEventName, |
43 extensions::api::file_system_provider::OnAddWatcherRequested::Create( | 43 extensions::api::file_system_provider::OnAddWatcherRequested::Create( |
44 options)); | 44 options)); |
45 } | 45 } |
46 | 46 |
47 void AddWatcher::OnSuccess(int /* request_id */, | 47 void AddWatcher::OnSuccess(int /* request_id */, |
48 scoped_ptr<RequestValue> /* result */, | 48 std::unique_ptr<RequestValue> /* result */, |
49 bool has_more) { | 49 bool has_more) { |
50 callback_.Run(base::File::FILE_OK); | 50 callback_.Run(base::File::FILE_OK); |
51 } | 51 } |
52 | 52 |
53 void AddWatcher::OnError(int /* request_id */, | 53 void AddWatcher::OnError(int /* request_id */, |
54 scoped_ptr<RequestValue> /* result */, | 54 std::unique_ptr<RequestValue> /* result */, |
55 base::File::Error error) { | 55 base::File::Error error) { |
56 callback_.Run(error); | 56 callback_.Run(error); |
57 } | 57 } |
58 | 58 |
59 } // namespace operations | 59 } // namespace operations |
60 } // namespace file_system_provider | 60 } // namespace file_system_provider |
61 } // namespace chromeos | 61 } // namespace chromeos |
OLD | NEW |