mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update source files for bracket style
This commit is contained in:
@@ -24,8 +24,9 @@ std::string GenerateHeaders(const HeaderMap& map) {
|
||||
|
||||
if (!key.empty()) {
|
||||
// Delimit with "\r\n".
|
||||
if (!headers.empty())
|
||||
if (!headers.empty()) {
|
||||
headers += "\r\n";
|
||||
}
|
||||
|
||||
headers += std::string(key) + ": " + std::string(value);
|
||||
}
|
||||
@@ -50,8 +51,9 @@ void MakeASCIILower(std::string* str) {
|
||||
HeaderMap::iterator FindHeaderInMap(const std::string& nameLower,
|
||||
HeaderMap& map) {
|
||||
for (auto it = map.begin(); it != map.end(); ++it) {
|
||||
if (base::EqualsCaseInsensitiveASCII(it->first.ToString(), nameLower))
|
||||
if (base::EqualsCaseInsensitiveASCII(it->first.ToString(), nameLower)) {
|
||||
return it;
|
||||
}
|
||||
}
|
||||
|
||||
return map.end();
|
||||
|
@@ -10,7 +10,8 @@
|
||||
scoped_refptr<base::RefCountedMemory> NetResourceProvider(int key) {
|
||||
// Chrome performs substitution of localized strings for directory listings.
|
||||
scoped_refptr<base::RefCountedMemory> value = ChromeNetResourceProvider(key);
|
||||
if (!value)
|
||||
if (!value) {
|
||||
LOG(ERROR) << "No data resource available for id " << key;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
@@ -17,8 +17,9 @@
|
||||
namespace scheme {
|
||||
|
||||
void AddInternalSchemes(content::ContentClient::Schemes* schemes) {
|
||||
if (!cef::IsAlloyRuntimeEnabled())
|
||||
if (!cef::IsAlloyRuntimeEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// chrome: and chrome-devtools: schemes are registered in
|
||||
// RenderThreadImpl::RegisterSchemes().
|
||||
@@ -39,16 +40,21 @@ void AddInternalSchemes(content::ContentClient::Schemes* schemes) {
|
||||
// with Blink only.
|
||||
for (size_t i = 0; i < sizeof(internal_schemes) / sizeof(internal_schemes[0]);
|
||||
++i) {
|
||||
if (internal_schemes[i].is_standard)
|
||||
if (internal_schemes[i].is_standard) {
|
||||
schemes->standard_schemes.push_back(internal_schemes[i].scheme_name);
|
||||
if (internal_schemes[i].is_local)
|
||||
}
|
||||
if (internal_schemes[i].is_local) {
|
||||
schemes->local_schemes.push_back(internal_schemes[i].scheme_name);
|
||||
if (internal_schemes[i].is_secure)
|
||||
}
|
||||
if (internal_schemes[i].is_secure) {
|
||||
schemes->secure_schemes.push_back(internal_schemes[i].scheme_name);
|
||||
if (internal_schemes[i].is_cors_enabled)
|
||||
}
|
||||
if (internal_schemes[i].is_cors_enabled) {
|
||||
schemes->cors_enabled_schemes.push_back(internal_schemes[i].scheme_name);
|
||||
if (internal_schemes[i].is_csp_bypassing)
|
||||
}
|
||||
if (internal_schemes[i].is_csp_bypassing) {
|
||||
schemes->csp_bypassing_schemes.push_back(internal_schemes[i].scheme_name);
|
||||
}
|
||||
CefAppManager::Get()->AddCustomScheme(&internal_schemes[i]);
|
||||
}
|
||||
}
|
||||
@@ -72,8 +78,9 @@ bool IsInternalHandledScheme(const std::string& scheme) {
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < sizeof(schemes) / sizeof(schemes[0]); ++i) {
|
||||
if (scheme == schemes[i])
|
||||
if (scheme == schemes[i]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@@ -18,8 +18,9 @@ GURL MakeGURL(const CefString& url, bool fixup) {
|
||||
new_url.insert(0, fixed_scheme);
|
||||
gurl = GURL(new_url);
|
||||
}
|
||||
if (fixup)
|
||||
if (fixup) {
|
||||
FixupGURL(gurl);
|
||||
}
|
||||
return gurl;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user