| 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 "components/drive/drive_api_util.h" | 5 #include "components/drive/drive_api_util.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 const HostedDocumentKind kHostedDocumentKinds[] = { | 37 const HostedDocumentKind kHostedDocumentKinds[] = { |
| 38 {kGoogleDocumentMimeType, ".gdoc"}, | 38 {kGoogleDocumentMimeType, ".gdoc"}, |
| 39 {kGoogleSpreadsheetMimeType, ".gsheet"}, | 39 {kGoogleSpreadsheetMimeType, ".gsheet"}, |
| 40 {kGooglePresentationMimeType, ".gslides"}, | 40 {kGooglePresentationMimeType, ".gslides"}, |
| 41 {kGoogleDrawingMimeType, ".gdraw"}, | 41 {kGoogleDrawingMimeType, ".gdraw"}, |
| 42 {kGoogleTableMimeType, ".gtable"}, | 42 {kGoogleTableMimeType, ".gtable"}, |
| 43 {kGoogleFormMimeType, ".gform"}, | 43 {kGoogleFormMimeType, ".gform"}, |
| 44 {kGoogleMapMimeType, ".gmaps"}, | 44 {kGoogleMapMimeType, ".gmaps"}, |
| 45 {kGoogleSiteMimeType, ".gsite"}, |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 const char kUnknownHostedDocumentExtension[] = ".glink"; | 48 const char kUnknownHostedDocumentExtension[] = ".glink"; |
| 48 | 49 |
| 49 const int kMd5DigestBufferSize = 512 * 1024; // 512 kB. | 50 const int kMd5DigestBufferSize = 512 * 1024; // 512 kB. |
| 50 | 51 |
| 51 } // namespace | 52 } // namespace |
| 52 | 53 |
| 53 std::string EscapeQueryStringValue(const std::string& str) { | 54 std::string EscapeQueryStringValue(const std::string& str) { |
| 54 std::string result; | 55 std::string result; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 const std::string extension = base::FilePath(path.Extension()).AsUTF8Unsafe(); | 194 const std::string extension = base::FilePath(path.Extension()).AsUTF8Unsafe(); |
| 194 for (size_t i = 0; i < arraysize(kHostedDocumentKinds); ++i) { | 195 for (size_t i = 0; i < arraysize(kHostedDocumentKinds); ++i) { |
| 195 if (extension == kHostedDocumentKinds[i].extension) | 196 if (extension == kHostedDocumentKinds[i].extension) |
| 196 return true; | 197 return true; |
| 197 } | 198 } |
| 198 return extension == kUnknownHostedDocumentExtension; | 199 return extension == kUnknownHostedDocumentExtension; |
| 199 } | 200 } |
| 200 | 201 |
| 201 } // namespace util | 202 } // namespace util |
| 202 } // namespace drive | 203 } // namespace drive |
| OLD | NEW |