Skip to content

Commit

Permalink
s/global/session in constants
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored and zcbenz committed Dec 5, 2017
1 parent d270731 commit d9359d8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion atom/browser/web_contents_preferences.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
mate::Handle<atom::api::WebContents> api_web_contents = atom::api::WebContents::CreateFrom(isolate, web_contents);
for (auto preloadPath : atom::api::Session::CreateFrom(isolate, api_web_contents.get()->GetBrowserContext())->GetPreloads()) {
if (base::FilePath(preloadPath).IsAbsolute())
command_line->AppendSwitchNative(switches::kGlobalPreloadScript,
command_line->AppendSwitchNative(switches::kSessionPreloadScript,
preloadPath);
else
LOG(ERROR) << "preload script must have absolute path.";
Expand Down
24 changes: 12 additions & 12 deletions atom/common/options_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,18 @@ const char kAppUserModelId[] = "app-user-model-id";
const char kAppPath[] = "app-path";

// The command line switch versions of the options.
const char kBackgroundColor[] = "background-color";
const char kPreloadScript[] = "preload";
const char kPreloadURL[] = "preload-url";
const char kGlobalPreloadScript[] = "global-preload";
const char kNodeIntegration[] = "node-integration";
const char kContextIsolation[] = "context-isolation";
const char kGuestInstanceID[] = "guest-instance-id";
const char kOpenerID[] = "opener-id";
const char kScrollBounce[] = "scroll-bounce";
const char kHiddenPage[] = "hidden-page";
const char kNativeWindowOpen[] = "native-window-open";
const char kWebviewTag[] = "webview-tag";
const char kBackgroundColor[] = "background-color";
const char kPreloadScript[] = "preload";
const char kPreloadURL[] = "preload-url";
const char kSessionPreloadScript[] = "session-preload";
const char kNodeIntegration[] = "node-integration";
const char kContextIsolation[] = "context-isolation";
const char kGuestInstanceID[] = "guest-instance-id";
const char kOpenerID[] = "opener-id";
const char kScrollBounce[] = "scroll-bounce";
const char kHiddenPage[] = "hidden-page";
const char kNativeWindowOpen[] = "native-window-open";
const char kWebviewTag[] = "webview-tag";

// Command switch passed to renderer process to control nodeIntegration.
const char kNodeIntegrationInWorker[] = "node-integration-in-worker";
Expand Down
2 changes: 1 addition & 1 deletion atom/common/options_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extern const char kAppPath[];
extern const char kBackgroundColor[];
extern const char kPreloadScript[];
extern const char kPreloadURL[];
extern const char kGlobalPreloadScript[];
extern const char kSessionPreloadScript[];
extern const char kNodeIntegration[];
extern const char kContextIsolation[];
extern const char kGuestInstanceID[];
Expand Down
2 changes: 1 addition & 1 deletion lib/renderer/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ for (let arg of process.argv) {
appPath = arg.substr(arg.indexOf('=') + 1)
} else if (arg.indexOf('--webview-tag=') === 0) {
webviewTag = arg.substr(arg.indexOf('=') + 1)
} else if (arg.indexOf('--global-preload') === 0) {
} else if (arg.indexOf('--session-preload') === 0) {
sessionPreloadScripts.push(arg.substr(arg.indexOf('=') + 1))
}
}
Expand Down

0 comments on commit d9359d8

Please sign in to comment.