OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/file_path.h" | 5 #include "webkit/plugins/ppapi/file_path.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "webkit/plugins/ppapi/plugin_module.h" | 9 #include "webkit/plugins/ppapi/plugin_module.h" |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 path_() { | 32 path_() { |
33 } | 33 } |
34 | 34 |
35 PepperFilePath::PepperFilePath(Domain domain, FilePath path) | 35 PepperFilePath::PepperFilePath(Domain domain, FilePath path) |
36 : domain_(domain), | 36 : domain_(domain), |
37 path_(path) { | 37 path_(path) { |
38 // TODO(viettrungluu): Should we DCHECK() some things here? | 38 // TODO(viettrungluu): Should we DCHECK() some things here? |
39 } | 39 } |
40 | 40 |
41 // static | 41 // static |
42 PepperFilePath PepperFilePath::MakeAbsolute(const char* utf8_path) { | 42 PepperFilePath PepperFilePath::MakeAbsolute(const FilePath& path) { |
43 return PepperFilePath(DOMAIN_ABSOLUTE, GetFilePathFromUTF8(utf8_path)); | 43 return PepperFilePath(DOMAIN_ABSOLUTE, path); |
44 } | 44 } |
45 | 45 |
46 // static | 46 // static |
47 PepperFilePath PepperFilePath::MakeModuleLocal(PluginModule* module, | 47 PepperFilePath PepperFilePath::MakeModuleLocal(PluginModule* module, |
48 const char* utf8_path) { | 48 const char* utf8_path) { |
49 FilePath full_path = GetFilePathFromUTF8(module->name()).Append( | 49 FilePath full_path = GetFilePathFromUTF8(module->name()).Append( |
50 GetFilePathFromUTF8(utf8_path)); | 50 GetFilePathFromUTF8(utf8_path)); |
51 return PepperFilePath(DOMAIN_MODULE_LOCAL, full_path); | 51 return PepperFilePath(DOMAIN_MODULE_LOCAL, full_path); |
52 } | 52 } |
53 | 53 |
54 } // namespace ppapi | 54 } // namespace ppapi |
55 } // namespace webkit | 55 } // namespace webkit |
OLD | NEW |