From 25015c4c6373e74eb496f448e0d5d730aa4c9fe8 Mon Sep 17 00:00:00 2001 From: rreimann Date: Mon, 22 May 2017 09:08:47 +0200 Subject: [PATCH] Fix naming and formatting --- atom/browser/web_contents_preferences.cc | 8 ++++---- atom/browser/web_contents_preferences.h | 2 +- spec/chromium-spec.js | 5 +---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/atom/browser/web_contents_preferences.cc b/atom/browser/web_contents_preferences.cc index 168a6452fd5..a17c44fe05a 100644 --- a/atom/browser/web_contents_preferences.cc +++ b/atom/browser/web_contents_preferences.cc @@ -207,7 +207,7 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches( } bool WebContentsPreferences::IsPreferenceEnabled( - const std::string& attributeName, + const std::string& attribute_name, content::WebContents* web_contents) { WebContentsPreferences* self; if (!web_contents) @@ -218,9 +218,9 @@ bool WebContentsPreferences::IsPreferenceEnabled( return false; base::DictionaryValue& web_preferences = self->web_preferences_; - bool boolValue = false; - web_preferences.GetBoolean(attributeName, &boolValue); - return boolValue; + bool bool_value = false; + web_preferences.GetBoolean(attribute_name, &bool_value); + return bool_value; } bool WebContentsPreferences::IsSandboxed(content::WebContents* web_contents) { diff --git a/atom/browser/web_contents_preferences.h b/atom/browser/web_contents_preferences.h index d3b565201b7..a2312e4ab44 100644 --- a/atom/browser/web_contents_preferences.h +++ b/atom/browser/web_contents_preferences.h @@ -37,7 +37,7 @@ class WebContentsPreferences static void AppendExtraCommandLineSwitches( content::WebContents* web_contents, base::CommandLine* command_line); - static bool IsPreferenceEnabled(const std::string& attributeName, + static bool IsPreferenceEnabled(const std::string& attribute_name, content::WebContents* web_contents); static bool IsSandboxed(content::WebContents* web_contents); static bool UsesNativeWindowOpen(content::WebContents* web_contents); diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 4d93c8c5a13..42d6ff2f519 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -1048,10 +1048,7 @@ describe('chromium feature', function () { it('should download a pdf when plugins are disabled', function (done) { createBrowserWindow(false) ipcRenderer.sendSync('set-download-option', false, false) - ipcRenderer.once('download-done', function (event, state, url, - mimeType, receivedBytes, - totalBytes, disposition, - filename) { + ipcRenderer.once('download-done', function (event, state, url, mimeType, receivedBytes, totalBytes, disposition, filename) { assert.equal(state, 'completed') assert.equal(filename, 'cat.pdf') assert.equal(mimeType, 'application/pdf')