Chromium Code Reviews| 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/stat.h> | 7 #include <sys/stat.h> |
| 8 #include <sys/statvfs.h> | 8 #include <sys/statvfs.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 #include <utime.h> | 10 #include <utime.h> |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 } | 183 } |
| 184 | 184 |
| 185 FileBrowserPrivateRequestFileSystemFunction:: | 185 FileBrowserPrivateRequestFileSystemFunction:: |
| 186 ~FileBrowserPrivateRequestFileSystemFunction() { | 186 ~FileBrowserPrivateRequestFileSystemFunction() { |
| 187 } | 187 } |
| 188 | 188 |
| 189 void FileBrowserPrivateRequestFileSystemFunction::DidOpenFileSystem( | 189 void FileBrowserPrivateRequestFileSystemFunction::DidOpenFileSystem( |
| 190 scoped_refptr<fileapi::FileSystemContext> file_system_context, | 190 scoped_refptr<fileapi::FileSystemContext> file_system_context, |
| 191 base::PlatformFileError result, | 191 base::PlatformFileError result, |
| 192 const std::string& name, | 192 const std::string& name, |
| 193 const GURL& root_path) { | 193 const GURL& root_url) { |
|
benwells
2013/09/09 05:04:20
Should there be a matching change in the .h?
satorux1
2013/09/09 05:27:28
Good catch! Done.
| |
| 194 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 194 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 195 | 195 |
| 196 if (result != base::PLATFORM_FILE_OK) { | 196 if (result != base::PLATFORM_FILE_OK) { |
| 197 DidFail(result); | 197 DidFail(result); |
| 198 return; | 198 return; |
| 199 } | 199 } |
| 200 | 200 |
| 201 // RenderViewHost may have gone while the task is posted asynchronously. | 201 // RenderViewHost may have gone while the task is posted asynchronously. |
| 202 if (!render_view_host()) { | 202 if (!render_view_host()) { |
| 203 DidFail(base::PLATFORM_FILE_ERROR_FAILED); | 203 DidFail(base::PLATFORM_FILE_ERROR_FAILED); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 218 // UI only when we perform proper authentication. | 218 // UI only when we perform proper authentication. |
| 219 // | 219 // |
| 220 // Note that we call this function even when Drive is disabled by the | 220 // Note that we call this function even when Drive is disabled by the |
| 221 // setting. Otherwise, we need to call this when the setting is changed at | 221 // setting. Otherwise, we need to call this when the setting is changed at |
| 222 // a later time, which complicates the code. | 222 // a later time, which complicates the code. |
| 223 SetDriveMountPointPermissions(profile_, extension_id(), render_view_host()); | 223 SetDriveMountPointPermissions(profile_, extension_id(), render_view_host()); |
| 224 | 224 |
| 225 DictionaryValue* dict = new DictionaryValue(); | 225 DictionaryValue* dict = new DictionaryValue(); |
| 226 SetResult(dict); | 226 SetResult(dict); |
| 227 dict->SetString("name", name); | 227 dict->SetString("name", name); |
| 228 dict->SetString("path", root_path.spec()); | 228 dict->SetString("root_url", root_url.spec()); |
| 229 dict->SetInteger("error", drive::FILE_ERROR_OK); | 229 dict->SetInteger("error", drive::FILE_ERROR_OK); |
| 230 SendResponse(true); | 230 SendResponse(true); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void FileBrowserPrivateRequestFileSystemFunction::DidFail( | 233 void FileBrowserPrivateRequestFileSystemFunction::DidFail( |
| 234 base::PlatformFileError error_code) { | 234 base::PlatformFileError error_code) { |
| 235 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 235 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 236 | 236 |
| 237 error_ = base::StringPrintf(kFileError, static_cast<int>(error_code)); | 237 error_ = base::StringPrintf(kFileError, static_cast<int>(error_code)); |
| 238 SendResponse(false); | 238 SendResponse(false); |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 647 FileBrowserPrivateCancelCopyFunction::~FileBrowserPrivateCancelCopyFunction() { | 647 FileBrowserPrivateCancelCopyFunction::~FileBrowserPrivateCancelCopyFunction() { |
| 648 } | 648 } |
| 649 | 649 |
| 650 bool FileBrowserPrivateCancelCopyFunction::RunImpl() { | 650 bool FileBrowserPrivateCancelCopyFunction::RunImpl() { |
| 651 // TODO(hidehiko): Implement cancelCopy function. | 651 // TODO(hidehiko): Implement cancelCopy function. |
| 652 NOTIMPLEMENTED(); | 652 NOTIMPLEMENTED(); |
| 653 return false; | 653 return false; |
| 654 } | 654 } |
| 655 | 655 |
| 656 } // namespace extensions | 656 } // namespace extensions |
| OLD | NEW |