OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/drive/resource_entry_conversion.h" | 5 #include "chrome/browser/chromeos/drive/resource_entry_conversion.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "chrome/browser/chromeos/drive/drive.pb.h" | 13 #include "chrome/browser/chromeos/drive/drive.pb.h" |
14 #include "chrome/browser/chromeos/drive/file_system_util.h" | 14 #include "chrome/browser/chromeos/drive/file_system_util.h" |
15 #include "chrome/browser/drive/drive_api_util.h" | 15 #include "chrome/browser/drive/drive_api_util.h" |
16 #include "chrome/browser/google_apis/gdata_wapi_parser.h" | 16 #include "google_apis/drive/gdata_wapi_parser.h" |
17 | 17 |
18 namespace drive { | 18 namespace drive { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 const char kSharedWithMeLabel[] = "shared-with-me"; | 22 const char kSharedWithMeLabel[] = "shared-with-me"; |
23 | 23 |
24 // Checks if |entry| has a label "shared-with-me", which is added to entries | 24 // Checks if |entry| has a label "shared-with-me", which is added to entries |
25 // shared with the user. | 25 // shared with the user. |
26 bool HasSharedWithMeLabel(const google_apis::ResourceEntry& entry) { | 26 bool HasSharedWithMeLabel(const google_apis::ResourceEntry& entry) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 PlatformFileInfoProto* entry_file_info = entry->mutable_file_info(); | 154 PlatformFileInfoProto* entry_file_info = entry->mutable_file_info(); |
155 entry_file_info->set_size(file_info.size); | 155 entry_file_info->set_size(file_info.size); |
156 entry_file_info->set_is_directory(file_info.is_directory); | 156 entry_file_info->set_is_directory(file_info.is_directory); |
157 entry_file_info->set_is_symbolic_link(file_info.is_symbolic_link); | 157 entry_file_info->set_is_symbolic_link(file_info.is_symbolic_link); |
158 entry_file_info->set_last_modified(file_info.last_modified.ToInternalValue()); | 158 entry_file_info->set_last_modified(file_info.last_modified.ToInternalValue()); |
159 entry_file_info->set_last_accessed(file_info.last_accessed.ToInternalValue()); | 159 entry_file_info->set_last_accessed(file_info.last_accessed.ToInternalValue()); |
160 entry_file_info->set_creation_time(file_info.creation_time.ToInternalValue()); | 160 entry_file_info->set_creation_time(file_info.creation_time.ToInternalValue()); |
161 } | 161 } |
162 | 162 |
163 } // namespace drive | 163 } // namespace drive |
OLD | NEW |