зеркало из https://github.com/electron/electron.git
Avoid unnecessary copy of parameters.
This commit is contained in:
Родитель
99293dd57f
Коммит
5f724e57bc
|
@ -233,7 +233,7 @@ class ResolveProxyHelper {
|
|||
public:
|
||||
ResolveProxyHelper(AtomBrowserContext* browser_context,
|
||||
const GURL& url,
|
||||
Session::ResolveProxyCallback callback)
|
||||
const Session::ResolveProxyCallback& callback)
|
||||
: callback_(callback),
|
||||
original_thread_(base::ThreadTaskRunnerHandle::Get()) {
|
||||
scoped_refptr<net::URLRequestContextGetter> context_getter =
|
||||
|
|
|
@ -240,7 +240,7 @@ content::ServiceWorkerContext* GetServiceWorkerContext(
|
|||
}
|
||||
|
||||
// Called when CapturePage is done.
|
||||
void OnCapturePageDone(base::Callback<void(const gfx::Image&)> callback,
|
||||
void OnCapturePageDone(const base::Callback<void(const gfx::Image&)>& callback,
|
||||
const SkBitmap& bitmap,
|
||||
content::ReadbackResponse response) {
|
||||
callback.Run(gfx::Image::CreateFrom1xBitmap(bitmap));
|
||||
|
|
|
@ -102,7 +102,7 @@ class Browser : public WindowListObserver {
|
|||
std::vector<base::string16> args;
|
||||
};
|
||||
void SetLoginItemSettings(LoginItemSettings settings);
|
||||
LoginItemSettings GetLoginItemSettings(LoginItemSettings options);
|
||||
LoginItemSettings GetLoginItemSettings(const LoginItemSettings& options);
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
// Hide the application.
|
||||
|
|
|
@ -64,7 +64,7 @@ void Browser::SetLoginItemSettings(LoginItemSettings settings) {
|
|||
}
|
||||
|
||||
Browser::LoginItemSettings Browser::GetLoginItemSettings(
|
||||
LoginItemSettings options) {
|
||||
const LoginItemSettings& options) {
|
||||
return LoginItemSettings();
|
||||
}
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ bool Browser::ContinueUserActivity(const std::string& type,
|
|||
}
|
||||
|
||||
Browser::LoginItemSettings Browser::GetLoginItemSettings(
|
||||
LoginItemSettings options) {
|
||||
const LoginItemSettings& options) {
|
||||
LoginItemSettings settings;
|
||||
settings.open_at_login = base::mac::CheckLoginItemStatus(
|
||||
&settings.open_as_hidden);
|
||||
|
|
|
@ -287,7 +287,7 @@ void Browser::SetLoginItemSettings(LoginItemSettings settings) {
|
|||
}
|
||||
|
||||
Browser::LoginItemSettings Browser::GetLoginItemSettings(
|
||||
LoginItemSettings options) {
|
||||
const LoginItemSettings& options) {
|
||||
LoginItemSettings settings;
|
||||
base::string16 keyPath = L"Software\\Microsoft\\Windows\\CurrentVersion\\Run";
|
||||
base::win::RegKey key(HKEY_CURRENT_USER, keyPath.c_str(), KEY_ALL_ACCESS);
|
||||
|
|
|
@ -236,7 +236,7 @@ void AtomSandboxedRendererClient::WillReleaseScriptContext(
|
|||
|
||||
void AtomSandboxedRendererClient::InvokeIpcCallback(
|
||||
v8::Handle<v8::Context> context,
|
||||
std::string callback_name,
|
||||
const std::string& callback_name,
|
||||
std::vector<v8::Handle<v8::Value>> args) {
|
||||
auto isolate = context->GetIsolate();
|
||||
auto binding_key = mate::ConvertToV8(isolate, kIpcKey)->ToString();
|
||||
|
|
|
@ -22,7 +22,7 @@ class AtomSandboxedRendererClient : public content::ContentRendererClient {
|
|||
void WillReleaseScriptContext(
|
||||
v8::Handle<v8::Context> context, content::RenderFrame* render_frame);
|
||||
void InvokeIpcCallback(v8::Handle<v8::Context> context,
|
||||
std::string callback_name,
|
||||
const std::string& callback_name,
|
||||
std::vector<v8::Handle<v8::Value>> args);
|
||||
// content::ContentRendererClient:
|
||||
void RenderFrameCreated(content::RenderFrame*) override;
|
||||
|
|
Загрузка…
Ссылка в новой задаче