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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc

Issue 2346873004: Added 'starred' to EntryProperty in FileManagerPrivateAPI. (Closed)
Patch Set: Added and modified comments. Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/common/extensions/api/file_manager_private.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_drive.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_drive.h"
6 6
7 #include <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // thumbnail. Given that we support hdpi devices, maximum dimension is 360. 76 // thumbnail. Given that we support hdpi devices, maximum dimension is 360.
77 const int kFileManagerMaximumThumbnailDimension = 360; 77 const int kFileManagerMaximumThumbnailDimension = 360;
78 78
79 // Copies properties from |entry_proto| to |properties|. |shared_with_me| is 79 // Copies properties from |entry_proto| to |properties|. |shared_with_me| is
80 // given from the running profile. 80 // given from the running profile.
81 void FillEntryPropertiesValueForDrive(const drive::ResourceEntry& entry_proto, 81 void FillEntryPropertiesValueForDrive(const drive::ResourceEntry& entry_proto,
82 bool shared_with_me, 82 bool shared_with_me,
83 EntryProperties* properties) { 83 EntryProperties* properties) {
84 properties->shared_with_me.reset(new bool(shared_with_me)); 84 properties->shared_with_me.reset(new bool(shared_with_me));
85 properties->shared.reset(new bool(entry_proto.shared())); 85 properties->shared.reset(new bool(entry_proto.shared()));
86 properties->starred.reset(new bool(entry_proto.starred()));
86 87
87 const drive::PlatformFileInfoProto& file_info = entry_proto.file_info(); 88 const drive::PlatformFileInfoProto& file_info = entry_proto.file_info();
88 properties->size.reset(new double(file_info.size())); 89 properties->size.reset(new double(file_info.size()));
89 properties->modification_time.reset(new double( 90 properties->modification_time.reset(new double(
90 base::Time::FromInternalValue(file_info.last_modified()).ToJsTime())); 91 base::Time::FromInternalValue(file_info.last_modified()).ToJsTime()));
91 92
92 if (!entry_proto.has_file_specific_info()) 93 if (!entry_proto.has_file_specific_info())
93 return; 94 return;
94 95
95 const drive::FileSpecificInfo& file_specific_info = 96 const drive::FileSpecificInfo& file_specific_info =
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 } 1144 }
1144 1145
1145 const std::string url = 1146 const std::string url =
1146 download_url_.Resolve("?alt=media&access_token=" + access_token).spec(); 1147 download_url_.Resolve("?alt=media&access_token=" + access_token).spec();
1147 SetResult(base::MakeUnique<base::StringValue>(url)); 1148 SetResult(base::MakeUnique<base::StringValue>(url));
1148 1149
1149 SendResponse(true); 1150 SendResponse(true);
1150 } 1151 }
1151 1152
1152 } // namespace extensions 1153 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/api/file_manager_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698