Lines Matching refs:extension_path
33 std::string GetInternalPath(const std::string& extension_path) { in GetInternalPath() argument
35 std::string extension_path_lower = extension_path; in GetInternalPath()
48 internal_path = extension_path.substr(resources_path_lower.size()); in GetInternalPath()
50 internal_path = extension_path; in GetInternalPath()
75 void GetInternalManifest(const std::string& extension_path, in GetInternalManifest() argument
80 base::BindOnce(GetInternalManifest, extension_path, in GetInternalManifest()
86 file_util::JoinPath(extension_path, "manifest.json")); in GetInternalManifest()
111 const std::string& extension_path, in LoadExtensionWithManifest() argument
118 request_context->LoadExtension(extension_path, manifest, handler); in LoadExtensionWithManifest()
123 bool IsInternalExtension(const std::string& extension_path) { in IsInternalExtension() argument
127 const std::string& internal_path = GetInternalPath(extension_path); in IsInternalExtension()
141 const std::string& extension_path) { in GetInternalExtensionResourcePath() argument
142 return "extensions/" + GetInternalPath(extension_path); in GetInternalExtensionResourcePath()
145 std::string GetExtensionResourcePath(const std::string& extension_path, in GetExtensionResourcePath() argument
147 const bool is_internal = IsInternalExtension(extension_path); in GetExtensionResourcePath()
151 return GetInternalExtensionResourcePath(extension_path); in GetExtensionResourcePath()
152 return extension_path; in GetExtensionResourcePath()
155 bool GetExtensionResourceContents(const std::string& extension_path, in GetExtensionResourceContents() argument
159 if (IsInternalExtension(extension_path)) { in GetExtensionResourceContents()
161 GetInternalExtensionResourcePath(extension_path); in GetExtensionResourceContents()
165 return file_util::ReadFileToString(extension_path, &contents); in GetExtensionResourceContents()
169 const std::string& extension_path, in LoadExtension() argument
174 extension_path, handler)); in LoadExtension()
178 if (IsInternalExtension(extension_path)) { in LoadExtension()
181 extension_path, in LoadExtension()
183 extension_path, handler)); in LoadExtension()
186 request_context->LoadExtension(extension_path, nullptr, handler); in LoadExtension()