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 "google_apis/drive/gdata_wapi_parser.h" | 5 #include "google_apis/drive/gdata_wapi_parser.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 return std::string(); | 532 return std::string(); |
533 } | 533 } |
534 } | 534 } |
535 return std::string(); | 535 return std::string(); |
536 } | 536 } |
537 | 537 |
538 // static | 538 // static |
539 int ResourceEntry::ClassifyEntryKindByFileExtension( | 539 int ResourceEntry::ClassifyEntryKindByFileExtension( |
540 const base::FilePath& file_path) { | 540 const base::FilePath& file_path) { |
541 #if defined(OS_WIN) | 541 #if defined(OS_WIN) |
542 std::string file_extension = WideToUTF8(file_path.Extension()); | 542 std::string file_extension = base::WideToUTF8(file_path.Extension()); |
543 #else | 543 #else |
544 std::string file_extension = file_path.Extension(); | 544 std::string file_extension = file_path.Extension(); |
545 #endif | 545 #endif |
546 for (size_t i = 0; i < arraysize(kEntryKindMap); ++i) { | 546 for (size_t i = 0; i < arraysize(kEntryKindMap); ++i) { |
547 const char* document_extension = kEntryKindMap[i].extension; | 547 const char* document_extension = kEntryKindMap[i].extension; |
548 if (document_extension && file_extension == document_extension) | 548 if (document_extension && file_extension == document_extension) |
549 return ClassifyEntryKind(kEntryKindMap[i].kind); | 549 return ClassifyEntryKind(kEntryKindMap[i].kind); |
550 } | 550 } |
551 return 0; | 551 return 0; |
552 } | 552 } |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 bool AccountMetadata::Parse(const base::Value& value) { | 874 bool AccountMetadata::Parse(const base::Value& value) { |
875 base::JSONValueConverter<AccountMetadata> converter; | 875 base::JSONValueConverter<AccountMetadata> converter; |
876 if (!converter.Convert(value, this)) { | 876 if (!converter.Convert(value, this)) { |
877 LOG(ERROR) << "Unable to parse: Invalid account metadata feed!"; | 877 LOG(ERROR) << "Unable to parse: Invalid account metadata feed!"; |
878 return false; | 878 return false; |
879 } | 879 } |
880 return true; | 880 return true; |
881 } | 881 } |
882 | 882 |
883 } // namespace google_apis | 883 } // namespace google_apis |
OLD | NEW |