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_drive.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_drive.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "chrome/browser/chromeos/drive/drive_app_registry.h" | 9 #include "chrome/browser/chromeos/drive/drive_app_registry.h" |
10 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 10 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 api::file_browser_private::DriveEntryProperties* properties) { | 50 api::file_browser_private::DriveEntryProperties* properties) { |
51 properties->shared_with_me.reset(new bool(entry_proto.shared_with_me())); | 51 properties->shared_with_me.reset(new bool(entry_proto.shared_with_me())); |
52 | 52 |
53 if (!entry_proto.has_file_specific_info()) | 53 if (!entry_proto.has_file_specific_info()) |
54 return; | 54 return; |
55 | 55 |
56 const drive::FileSpecificInfo& file_specific_info = | 56 const drive::FileSpecificInfo& file_specific_info = |
57 entry_proto.file_specific_info(); | 57 entry_proto.file_specific_info(); |
58 | 58 |
59 properties->thumbnail_url.reset( | 59 properties->thumbnail_url.reset( |
60 new std::string(file_specific_info.thumbnail_url())); | 60 new std::string("https://www.googledrive.com/thumb/" + |
| 61 entry_proto.resource_id() + "?width=500&height=500")); |
61 properties->is_hosted.reset( | 62 properties->is_hosted.reset( |
62 new bool(file_specific_info.is_hosted_document())); | 63 new bool(file_specific_info.is_hosted_document())); |
63 properties->content_mime_type.reset( | 64 properties->content_mime_type.reset( |
64 new std::string(file_specific_info.content_mime_type())); | 65 new std::string(file_specific_info.content_mime_type())); |
65 } | 66 } |
66 | 67 |
67 } // namespace | 68 } // namespace |
68 | 69 |
69 FileBrowserPrivateGetDriveEntryPropertiesFunction:: | 70 FileBrowserPrivateGetDriveEntryPropertiesFunction:: |
70 FileBrowserPrivateGetDriveEntryPropertiesFunction() { | 71 FileBrowserPrivateGetDriveEntryPropertiesFunction() { |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 error_ = "Share Url for this item is not available."; | 625 error_ = "Share Url for this item is not available."; |
625 SendResponse(false); | 626 SendResponse(false); |
626 return; | 627 return; |
627 } | 628 } |
628 | 629 |
629 SetResult(new base::StringValue(share_url.spec())); | 630 SetResult(new base::StringValue(share_url.spec())); |
630 SendResponse(true); | 631 SendResponse(true); |
631 } | 632 } |
632 | 633 |
633 } // namespace extensions | 634 } // namespace extensions |
OLD | NEW |