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

Side by Side Diff: google_apis/drive/gdata_wapi_parser.cc

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « extensions/common/stack_frame_unittest.cc ('k') | google_apis/gaia/oauth2_mint_token_flow.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 "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
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
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
OLDNEW
« no previous file with comments | « extensions/common/stack_frame_unittest.cc ('k') | google_apis/gaia/oauth2_mint_token_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698