Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Side by Side Diff: chrome/browser/chromeos/file_system_provider/operations/get_metadata.cc

Issue 294073007: [fsp] Let extensions decide about the file system id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/get_metadata.h " 5 #include "chrome/browser/chromeos/file_system_provider/operations/get_metadata.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 19 matching lines...) Expand all
30 output->is_symbolic_link = false; // Not supported. 30 output->is_symbolic_link = false; // Not supported.
31 31
32 std::string input_modification_time; 32 std::string input_modification_time;
33 if (!params->metadata.modification_time.additional_properties.GetString( 33 if (!params->metadata.modification_time.additional_properties.GetString(
34 "value", &input_modification_time)) { 34 "value", &input_modification_time)) {
35 return false; 35 return false;
36 } 36 }
37 37
38 // Allow to pass invalid modification time, since there is no way to verify 38 // Allow to pass invalid modification time, since there is no way to verify
39 // it easily on any earlier stage. 39 // it easily on any earlier stage.
40 base::Time::FromString( 40 base::Time::FromString(input_modification_time.c_str(),
41 input_modification_time.c_str(), &output->last_modified); 41 &output->last_modified);
42 42
43 return true; 43 return true;
44 } 44 }
45 45
46 } // namespace 46 } // namespace
47 47
48 GetMetadata::GetMetadata( 48 GetMetadata::GetMetadata(
49 extensions::EventRouter* event_router, 49 extensions::EventRouter* event_router,
50 const ProvidedFileSystemInfo& file_system_info, 50 const ProvidedFileSystemInfo& file_system_info,
51 const base::FilePath& directory_path, 51 const base::FilePath& directory_path,
(...skipping 25 matching lines...) Expand all
77 callback_.Run(base::File::FILE_OK, file_info); 77 callback_.Run(base::File::FILE_OK, file_info);
78 } 78 }
79 79
80 void GetMetadata::OnError(int /* request_id */, base::File::Error error) { 80 void GetMetadata::OnError(int /* request_id */, base::File::Error error) {
81 callback_.Run(error, base::File::Info()); 81 callback_.Run(error, base::File::Info());
82 } 82 }
83 83
84 } // namespace operations 84 } // namespace operations
85 } // namespace file_system_provider 85 } // namespace file_system_provider
86 } // namespace chromeos 86 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698