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

Side by Side Diff: chrome/browser/parsers/metadata_parser_filebase.cc

Issue 192017: Convert std::wstring encoding names to std::string in a bunch of files. (Closed)
Patch Set: mac and linux fixes Created 11 years, 3 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <iostream> 5 #include <iostream>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "chrome/browser/parsers/metadata_parser_filebase.h" 8 #include "chrome/browser/parsers/metadata_parser_filebase.h"
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 #if defined(OS_WIN) 24 #if defined(OS_WIN)
25 value = WideToUTF8(path_.BaseName().value()); 25 value = WideToUTF8(path_.BaseName().value());
26 properties_[MetadataParser::kPropertyTitle] = value; 26 properties_[MetadataParser::kPropertyTitle] = value;
27 #elif defined(OS_POSIX) 27 #elif defined(OS_POSIX)
28 properties_[MetadataParser::kPropertyTitle] = path_.BaseName().value(); 28 properties_[MetadataParser::kPropertyTitle] = path_.BaseName().value();
29 #endif 29 #endif
30 return true; 30 return true;
31 } 31 }
32 32
33 bool FileMetadataParser::GetProperty(const std::string&key, 33 bool FileMetadataParser::GetProperty(const std::string& key,
34 std::string* value) { 34 std::string* value) {
35 PropertyMap::iterator it = properties_.find(key.c_str()); 35 PropertyMap::iterator it = properties_.find(key.c_str());
36 if (it == properties_.end()) { 36 if (it == properties_.end()) {
37 return false; 37 return false;
38 } 38 }
39 39
40 *value = properties_[key.c_str()]; 40 *value = properties_[key.c_str()];
41 return true; 41 return true;
42 } 42 }
43 43
(...skipping 21 matching lines...) Expand all
65 return properties_.size(); 65 return properties_.size();
66 } 66 }
67 67
68 bool FileMetadataPropertyIterator::IsEnd() { 68 bool FileMetadataPropertyIterator::IsEnd() {
69 if (it == properties_.end()) { 69 if (it == properties_.end()) {
70 return true; 70 return true;
71 } else { 71 } else {
72 return false; 72 return false;
73 } 73 }
74 } 74 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.h ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698