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 <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 new bool(file_specific_info.cache_state().is_dirty())); | 127 new bool(file_specific_info.cache_state().is_dirty())); |
128 properties->present.reset( | 128 properties->present.reset( |
129 new bool(file_specific_info.cache_state().is_present())); | 129 new bool(file_specific_info.cache_state().is_present())); |
130 | 130 |
131 if (file_specific_info.cache_state().is_present()) { | 131 if (file_specific_info.cache_state().is_present()) { |
132 properties->available_offline.reset(new bool(true)); | 132 properties->available_offline.reset(new bool(true)); |
133 } else if (file_specific_info.is_hosted_document() && | 133 } else if (file_specific_info.is_hosted_document() && |
134 file_specific_info.has_document_extension()) { | 134 file_specific_info.has_document_extension()) { |
135 const std::string file_extension = file_specific_info.document_extension(); | 135 const std::string file_extension = file_specific_info.document_extension(); |
136 // What's available offline? See the 'Web' column at: | 136 // What's available offline? See the 'Web' column at: |
137 // http://support.google.com/drive/answer/1628467 | 137 // https://support.google.com/drive/answer/1628467 |
alexab
2015/05/22 00:08:47
https://support.google.com/drive/answer/2375012
Dan Beam
2015/05/22 01:08:45
Done.
| |
138 properties->available_offline.reset( | 138 properties->available_offline.reset( |
139 new bool(file_extension == ".gdoc" || file_extension == ".gdraw" || | 139 new bool(file_extension == ".gdoc" || file_extension == ".gdraw" || |
140 file_extension == ".gsheet" || file_extension == ".gslides")); | 140 file_extension == ".gsheet" || file_extension == ".gslides")); |
141 } else { | 141 } else { |
142 properties->available_offline.reset(new bool(false)); | 142 properties->available_offline.reset(new bool(false)); |
143 } | 143 } |
144 | 144 |
145 properties->available_when_metered.reset( | 145 properties->available_when_metered.reset( |
146 new bool(file_specific_info.cache_state().is_present() || | 146 new bool(file_specific_info.cache_state().is_present() || |
147 file_specific_info.is_hosted_document())); | 147 file_specific_info.is_hosted_document())); |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1077 } | 1077 } |
1078 | 1078 |
1079 const std::string url = | 1079 const std::string url = |
1080 download_url_.Resolve("?access_token=" + access_token).spec(); | 1080 download_url_.Resolve("?access_token=" + access_token).spec(); |
1081 SetResult(new base::StringValue(url)); | 1081 SetResult(new base::StringValue(url)); |
1082 | 1082 |
1083 SendResponse(true); | 1083 SendResponse(true); |
1084 } | 1084 } |
1085 | 1085 |
1086 } // namespace extensions | 1086 } // namespace extensions |
OLD | NEW |