Update source files for bracket style

This commit is contained in:
Marshall Greenblatt
2023-01-02 17:59:03 -05:00
parent d84b07a5cb
commit 3af3eab3e4
366 changed files with 7275 additions and 3834 deletions

View File

@ -94,8 +94,9 @@ void GetInternalManifest(const std::string& extension_path,
CefRefPtr<CefValue> value =
CefParseJSONAndReturnError(manifest_contents, JSON_PARSER_RFC, error_msg);
if (!value || value->GetType() != VTYPE_DICTIONARY) {
if (error_msg.empty())
if (error_msg.empty()) {
error_msg = "Incorrectly formatted dictionary contents.";
}
LOG(ERROR) << "Failed to parse manifest from " << manifest_path << "; "
<< error_msg.ToString();
RunManifestCallback(std::move(callback), nullptr);
@ -143,10 +144,12 @@ std::string GetInternalExtensionResourcePath(
std::string GetExtensionResourcePath(const std::string& extension_path,
bool* internal) {
const bool is_internal = IsInternalExtension(extension_path);
if (internal)
if (internal) {
*internal = is_internal;
if (is_internal)
}
if (is_internal) {
return GetInternalExtensionResourcePath(extension_path);
}
return extension_path;
}
@ -227,8 +230,9 @@ std::string GetExtensionURL(CefRefPtr<CefExtension> extension) {
if (browser_action) {
const std::string& default_popup =
browser_action->GetString("default_popup");
if (!default_popup.empty())
if (!default_popup.empty()) {
return GetExtensionOrigin(extension->GetIdentifier()) + default_popup;
}
}
return std::string();