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

Side by Side Diff: chrome/browser/drive/drive_api_util.cc

Issue 693843002: Add support for My Maps maps in Chrome OS Drive integration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment about gmap/gmaps. Created 6 years, 1 month 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 | « chrome/browser/drive/drive_api_util.h ('k') | chrome/browser/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 "chrome/browser/drive/drive_api_util.h" 5 #include "chrome/browser/drive/drive_api_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 18 matching lines...) Expand all
29 const char* mime_type; 29 const char* mime_type;
30 const char* extension; 30 const char* extension;
31 }; 31 };
32 32
33 const HostedDocumentKind kHostedDocumentKinds[] = { 33 const HostedDocumentKind kHostedDocumentKinds[] = {
34 {kGoogleDocumentMimeType, ".gdoc"}, 34 {kGoogleDocumentMimeType, ".gdoc"},
35 {kGoogleSpreadsheetMimeType, ".gsheet"}, 35 {kGoogleSpreadsheetMimeType, ".gsheet"},
36 {kGooglePresentationMimeType, ".gslides"}, 36 {kGooglePresentationMimeType, ".gslides"},
37 {kGoogleDrawingMimeType, ".gdraw"}, 37 {kGoogleDrawingMimeType, ".gdraw"},
38 {kGoogleTableMimeType, ".gtable"}, 38 {kGoogleTableMimeType, ".gtable"},
39 {kGoogleFormMimeType, ".gform"} 39 {kGoogleFormMimeType, ".gform"},
40 {kGoogleMapMimeType, ".gmaps"},
40 }; 41 };
41 42
42 const char kUnknownHostedDocumentExtension[] = ".glink"; 43 const char kUnknownHostedDocumentExtension[] = ".glink";
43 44
44 } // namespace 45 } // namespace
45 46
46 std::string EscapeQueryStringValue(const std::string& str) { 47 std::string EscapeQueryStringValue(const std::string& str) {
47 std::string result; 48 std::string result;
48 result.reserve(str.size()); 49 result.reserve(str.size());
49 for (size_t i = 0; i < str.size(); ++i) { 50 for (size_t i = 0; i < str.size(); ++i) {
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 const std::string extension = base::FilePath(path.Extension()).AsUTF8Unsafe(); 331 const std::string extension = base::FilePath(path.Extension()).AsUTF8Unsafe();
331 for (size_t i = 0; i < arraysize(kHostedDocumentKinds); ++i) { 332 for (size_t i = 0; i < arraysize(kHostedDocumentKinds); ++i) {
332 if (extension == kHostedDocumentKinds[i].extension) 333 if (extension == kHostedDocumentKinds[i].extension)
333 return true; 334 return true;
334 } 335 }
335 return extension == kUnknownHostedDocumentExtension; 336 return extension == kUnknownHostedDocumentExtension;
336 } 337 }
337 338
338 } // namespace util 339 } // namespace util
339 } // namespace drive 340 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/drive/drive_api_util.h ('k') | chrome/browser/drive/drive_api_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698