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

Side by Side Diff: components/drive/drive_api_util.cc

Issue 2113723003: Files: Add support for Google Sites. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « components/drive/drive_api_util.h ('k') | components/drive/drive_api_util_unittest.cc » ('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 (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
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
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
OLDNEW
« no previous file with comments | « components/drive/drive_api_util.h ('k') | components/drive/drive_api_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698