| 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/extensions/file_manager/private_api_file_syste
m.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_file_syste
m.h" |
| 6 | 6 |
| 7 #include <sys/statvfs.h> | 7 #include <sys/statvfs.h> |
| 8 | 8 |
| 9 #include "base/posix/eintr_wrapper.h" | 9 #include "base/posix/eintr_wrapper.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 SetResult(dict); | 335 SetResult(dict); |
| 336 dict->SetString("name", entry_definition.file_system_name); | 336 dict->SetString("name", entry_definition.file_system_name); |
| 337 dict->SetString("root_url", entry_definition.file_system_root_url); | 337 dict->SetString("root_url", entry_definition.file_system_root_url); |
| 338 dict->SetInteger("error", drive::FILE_ERROR_OK); | 338 dict->SetInteger("error", drive::FILE_ERROR_OK); |
| 339 SendResponse(true); | 339 SendResponse(true); |
| 340 } | 340 } |
| 341 | 341 |
| 342 void FileWatchFunctionBase::Respond(bool success) { | 342 void FileWatchFunctionBase::Respond(bool success) { |
| 343 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 343 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 344 | 344 |
| 345 SetResult(base::Value::CreateBooleanValue(success)); | 345 SetResult(new base::FundamentalValue(success)); |
| 346 SendResponse(success); | 346 SendResponse(success); |
| 347 } | 347 } |
| 348 | 348 |
| 349 bool FileWatchFunctionBase::RunAsync() { | 349 bool FileWatchFunctionBase::RunAsync() { |
| 350 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 350 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 351 | 351 |
| 352 if (!render_view_host() || !render_view_host()->GetProcess()) | 352 if (!render_view_host() || !render_view_host()->GetProcess()) |
| 353 return false; | 353 return false; |
| 354 | 354 |
| 355 // First param is url of a file to watch. | 355 // First param is url of a file to watch. |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 "/" + entry_definition_list->at(i).full_path.AsUTF8Unsafe(); | 672 "/" + entry_definition_list->at(i).full_path.AsUTF8Unsafe(); |
| 673 entry->file_is_directory = entry_definition_list->at(i).is_directory; | 673 entry->file_is_directory = entry_definition_list->at(i).is_directory; |
| 674 entries.push_back(entry); | 674 entries.push_back(entry); |
| 675 } | 675 } |
| 676 | 676 |
| 677 results_ = extensions::api::file_browser_private_internal:: | 677 results_ = extensions::api::file_browser_private_internal:: |
| 678 ResolveIsolatedEntries::Results::Create(entries); | 678 ResolveIsolatedEntries::Results::Create(entries); |
| 679 SendResponse(true); | 679 SendResponse(true); |
| 680 } | 680 } |
| 681 } // namespace extensions | 681 } // namespace extensions |
| OLD | NEW |