Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9ad5aeb6
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9ad5aeb6
编写于
11月 08, 2017
作者:
C
Christof Marti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove credentials code (fixes #37822)
上级
c561784a
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
1 addition
and
222 deletion
+1
-222
src/vs/code/electron-main/app.ts
src/vs/code/electron-main/app.ts
+0
-7
src/vs/platform/credentials/common/credentials.ts
src/vs/platform/credentials/common/credentials.ts
+0
-22
src/vs/platform/credentials/node/credentialsIpc.ts
src/vs/platform/credentials/node/credentialsIpc.ts
+0
-56
src/vs/platform/credentials/node/credentialsService.ts
src/vs/platform/credentials/node/credentialsService.ts
+0
-34
src/vs/workbench/api/electron-browser/extensionHost.contribution.ts
...kbench/api/electron-browser/extensionHost.contribution.ts
+0
-1
src/vs/workbench/api/electron-browser/mainThreadCredentials.ts
...s/workbench/api/electron-browser/mainThreadCredentials.ts
+0
-37
src/vs/workbench/api/node/extHost.api.impl.ts
src/vs/workbench/api/node/extHost.api.impl.ts
+1
-20
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+0
-11
src/vs/workbench/api/node/extHostCredentials.ts
src/vs/workbench/api/node/extHostCredentials.ts
+0
-29
src/vs/workbench/electron-browser/main.ts
src/vs/workbench/electron-browser/main.ts
+0
-5
未找到文件。
src/vs/code/electron-main/app.ts
浏览文件 @
9ad5aeb6
...
@@ -35,9 +35,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
...
@@ -35,9 +35,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import
{
NullTelemetryService
}
from
'
vs/platform/telemetry/common/telemetryUtils
'
;
import
{
NullTelemetryService
}
from
'
vs/platform/telemetry/common/telemetryUtils
'
;
import
{
ITelemetryAppenderChannel
,
TelemetryAppenderClient
}
from
'
vs/platform/telemetry/common/telemetryIpc
'
;
import
{
ITelemetryAppenderChannel
,
TelemetryAppenderClient
}
from
'
vs/platform/telemetry/common/telemetryIpc
'
;
import
{
TelemetryService
,
ITelemetryServiceConfig
}
from
'
vs/platform/telemetry/common/telemetryService
'
;
import
{
TelemetryService
,
ITelemetryServiceConfig
}
from
'
vs/platform/telemetry/common/telemetryService
'
;
import
{
ICredentialsService
}
from
'
vs/platform/credentials/common/credentials
'
;
import
{
CredentialsService
}
from
'
vs/platform/credentials/node/credentialsService
'
;
import
{
CredentialsChannel
}
from
'
vs/platform/credentials/node/credentialsIpc
'
;
import
{
resolveCommonProperties
,
machineIdStorageKey
,
machineIdIpcChannel
}
from
'
vs/platform/telemetry/node/commonProperties
'
;
import
{
resolveCommonProperties
,
machineIdStorageKey
,
machineIdIpcChannel
}
from
'
vs/platform/telemetry/node/commonProperties
'
;
import
{
getDelayedChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
getDelayedChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
product
from
'
vs/platform/node/product
'
;
import
product
from
'
vs/platform/node/product
'
;
...
@@ -288,7 +285,6 @@ export class CodeApplication {
...
@@ -288,7 +285,6 @@ export class CodeApplication {
services
.
set
(
IWindowsMainService
,
new
SyncDescriptor
(
WindowsManager
));
services
.
set
(
IWindowsMainService
,
new
SyncDescriptor
(
WindowsManager
));
services
.
set
(
IWindowsService
,
new
SyncDescriptor
(
WindowsService
,
this
.
sharedProcess
));
services
.
set
(
IWindowsService
,
new
SyncDescriptor
(
WindowsService
,
this
.
sharedProcess
));
services
.
set
(
ILaunchService
,
new
SyncDescriptor
(
LaunchService
));
services
.
set
(
ILaunchService
,
new
SyncDescriptor
(
LaunchService
));
services
.
set
(
ICredentialsService
,
new
SyncDescriptor
(
CredentialsService
));
// Telemtry
// Telemtry
if
(
this
.
environmentService
.
isBuilt
&&
!
this
.
environmentService
.
isExtensionDevelopment
&&
!
this
.
environmentService
.
args
[
'
disable-telemetry
'
]
&&
!!
product
.
enableTelemetry
)
{
if
(
this
.
environmentService
.
isBuilt
&&
!
this
.
environmentService
.
isExtensionDevelopment
&&
!
this
.
environmentService
.
args
[
'
disable-telemetry
'
]
&&
!!
product
.
enableTelemetry
)
{
...
@@ -346,9 +342,6 @@ export class CodeApplication {
...
@@ -346,9 +342,6 @@ export class CodeApplication {
this
.
electronIpcServer
.
registerChannel
(
'
windows
'
,
windowsChannel
);
this
.
electronIpcServer
.
registerChannel
(
'
windows
'
,
windowsChannel
);
this
.
sharedProcessClient
.
done
(
client
=>
client
.
registerChannel
(
'
windows
'
,
windowsChannel
));
this
.
sharedProcessClient
.
done
(
client
=>
client
.
registerChannel
(
'
windows
'
,
windowsChannel
));
const
credentialsService
=
accessor
.
get
(
ICredentialsService
);
const
credentialsChannel
=
new
CredentialsChannel
(
credentialsService
);
this
.
electronIpcServer
.
registerChannel
(
'
credentials
'
,
credentialsChannel
);
// Lifecycle
// Lifecycle
this
.
lifecycleService
.
ready
();
this
.
lifecycleService
.
ready
();
...
...
src/vs/platform/credentials/common/credentials.ts
已删除
100644 → 0
浏览文件 @
c561784a
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
export
const
ICredentialsService
=
createDecorator
<
ICredentialsService
>
(
'
credentialsService
'
);
export
interface
ICredentialsService
{
_serviceBrand
:
any
;
readSecret
(
service
:
string
,
account
:
string
):
TPromise
<
string
|
undefined
>
;
writeSecret
(
service
:
string
,
account
:
string
,
secret
:
string
):
TPromise
<
void
>
;
deleteSecret
(
service
:
string
,
account
:
string
):
TPromise
<
boolean
>
;
}
\ No newline at end of file
src/vs/platform/credentials/node/credentialsIpc.ts
已删除
100644 → 0
浏览文件 @
c561784a
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
IChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
ICredentialsService
}
from
'
vs/platform/credentials/common/credentials
'
;
export
interface
ICredentialsArgs
{
service
:
string
;
account
:
string
;
secret
?:
string
;
}
export
interface
ICredentialsChannel
extends
IChannel
{
call
(
command
:
'
readSecret
'
,
credentials
:
ICredentialsArgs
):
TPromise
<
string
>
;
call
(
command
:
'
writeSecret
'
,
credentials
:
ICredentialsArgs
):
TPromise
<
void
>
;
call
(
command
:
'
deleteSecret
'
,
credentials
:
ICredentialsArgs
):
TPromise
<
boolean
>
;
call
(
command
:
string
,
arg
?:
any
):
TPromise
<
any
>
;
}
export
class
CredentialsChannel
implements
ICredentialsChannel
{
constructor
(
private
service
:
ICredentialsService
)
{
}
call
(
command
:
string
,
arg
:
ICredentialsArgs
):
TPromise
<
any
>
{
switch
(
command
)
{
case
'
readSecret
'
:
return
this
.
service
.
readSecret
(
arg
.
service
,
arg
.
account
);
case
'
writeSecret
'
:
return
this
.
service
.
writeSecret
(
arg
.
service
,
arg
.
account
,
arg
.
secret
);
case
'
deleteSecret
'
:
return
this
.
service
.
deleteSecret
(
arg
.
service
,
arg
.
account
);
}
return
undefined
;
}
}
export
class
CredentialsChannelClient
implements
ICredentialsService
{
_serviceBrand
:
any
;
constructor
(
private
channel
:
ICredentialsChannel
)
{
}
readSecret
(
service
:
string
,
account
:
string
):
TPromise
<
string
|
undefined
>
{
return
this
.
channel
.
call
(
'
readSecret
'
,
{
service
,
account
});
}
writeSecret
(
service
:
string
,
account
:
string
,
secret
:
string
):
TPromise
<
void
>
{
return
this
.
channel
.
call
(
'
writeSecret
'
,
{
service
,
account
,
secret
});
}
deleteSecret
(
service
:
string
,
account
:
string
):
TPromise
<
boolean
>
{
return
this
.
channel
.
call
(
'
deleteSecret
'
,
{
service
,
account
});
}
}
\ No newline at end of file
src/vs/platform/credentials/node/credentialsService.ts
已删除
100644 → 0
浏览文件 @
c561784a
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
ICredentialsService
}
from
'
vs/platform/credentials/common/credentials
'
;
export
class
CredentialsService
implements
ICredentialsService
{
_serviceBrand
:
any
;
readSecret
(
service
:
string
,
account
:
string
):
TPromise
<
string
|
undefined
>
{
return
this
.
getKeytar
()
.
then
(
keytar
=>
TPromise
.
wrap
(
keytar
.
getPassword
(
service
,
account
)))
.
then
(
result
=>
result
===
null
?
undefined
:
result
);
}
writeSecret
(
service
:
string
,
account
:
string
,
secret
:
string
):
TPromise
<
void
>
{
return
this
.
getKeytar
()
.
then
(
keytar
=>
TPromise
.
wrap
(
keytar
.
setPassword
(
service
,
account
,
secret
)));
}
deleteSecret
(
service
:
string
,
account
:
string
):
TPromise
<
boolean
>
{
return
this
.
getKeytar
()
.
then
(
keytar
=>
TPromise
.
wrap
(
keytar
.
deletePassword
(
service
,
account
)));
}
private
getKeytar
()
{
// Avoids https://github.com/Microsoft/vscode/issues/33998
return
TPromise
.
wrap
(
import
(
'
keytar
'
));
}
}
src/vs/workbench/api/electron-browser/extensionHost.contribution.ts
浏览文件 @
9ad5aeb6
...
@@ -17,7 +17,6 @@ import { LanguageConfigurationFileHandler } from 'vs/workbench/parts/codeEditor/
...
@@ -17,7 +17,6 @@ import { LanguageConfigurationFileHandler } from 'vs/workbench/parts/codeEditor/
// --- mainThread participants
// --- mainThread participants
import
'
./mainThreadCommands
'
;
import
'
./mainThreadCommands
'
;
import
'
./mainThreadConfiguration
'
;
import
'
./mainThreadConfiguration
'
;
import
'
./mainThreadCredentials
'
;
import
'
./mainThreadDebugService
'
;
import
'
./mainThreadDebugService
'
;
import
'
./mainThreadDecorations
'
;
import
'
./mainThreadDecorations
'
;
import
'
./mainThreadDiagnostics
'
;
import
'
./mainThreadDiagnostics
'
;
...
...
src/vs/workbench/api/electron-browser/mainThreadCredentials.ts
已删除
100644 → 0
浏览文件 @
c561784a
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
ExtHostContext
,
MainThreadCredentialsShape
,
ExtHostCredentialsShape
,
MainContext
,
IExtHostContext
}
from
'
../node/extHost.protocol
'
;
import
{
ICredentialsService
}
from
'
vs/platform/credentials/common/credentials
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/electron-browser/extHostCustomers
'
;
@
extHostNamedCustomer
(
MainContext
.
MainThreadCredentials
)
export
class
MainThreadCredentials
implements
MainThreadCredentialsShape
{
// @ts-ignore unused property
private
_proxy
:
ExtHostCredentialsShape
;
constructor
(
extHostContext
:
IExtHostContext
,
@
ICredentialsService
private
_credentialsService
:
ICredentialsService
)
{
this
.
_proxy
=
extHostContext
.
get
(
ExtHostContext
.
ExtHostCredentials
);
}
public
dispose
():
void
{
}
$readSecret
(
service
:
string
,
account
:
string
):
Thenable
<
string
|
undefined
>
{
return
this
.
_credentialsService
.
readSecret
(
service
,
account
);
}
$writeSecret
(
service
:
string
,
account
:
string
,
secret
:
string
):
Thenable
<
void
>
{
return
this
.
_credentialsService
.
writeSecret
(
service
,
account
,
secret
);
}
$deleteSecret
(
service
:
string
,
account
:
string
):
Thenable
<
boolean
>
{
return
this
.
_credentialsService
.
deleteSecret
(
service
,
account
);
}
}
src/vs/workbench/api/node/extHost.api.impl.ts
浏览文件 @
9ad5aeb6
...
@@ -35,7 +35,6 @@ import { ExtHostLanguageFeatures } from 'vs/workbench/api/node/extHostLanguageFe
...
@@ -35,7 +35,6 @@ import { ExtHostLanguageFeatures } from 'vs/workbench/api/node/extHostLanguageFe
import
{
ExtHostApiCommands
}
from
'
vs/workbench/api/node/extHostApiCommands
'
;
import
{
ExtHostApiCommands
}
from
'
vs/workbench/api/node/extHostApiCommands
'
;
import
{
ExtHostTask
}
from
'
vs/workbench/api/node/extHostTask
'
;
import
{
ExtHostTask
}
from
'
vs/workbench/api/node/extHostTask
'
;
import
{
ExtHostDebugService
}
from
'
vs/workbench/api/node/extHostDebugService
'
;
import
{
ExtHostDebugService
}
from
'
vs/workbench/api/node/extHostDebugService
'
;
import
{
ExtHostCredentials
}
from
'
vs/workbench/api/node/extHostCredentials
'
;
import
{
ExtHostWindow
}
from
'
vs/workbench/api/node/extHostWindow
'
;
import
{
ExtHostWindow
}
from
'
vs/workbench/api/node/extHostWindow
'
;
import
*
as
extHostTypes
from
'
vs/workbench/api/node/extHostTypes
'
;
import
*
as
extHostTypes
from
'
vs/workbench/api/node/extHostTypes
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
URI
from
'
vs/base/common/uri
'
;
...
@@ -103,7 +102,6 @@ export function createApiFactory(
...
@@ -103,7 +102,6 @@ export function createApiFactory(
const
extHostTerminalService
=
threadService
.
set
(
ExtHostContext
.
ExtHostTerminalService
,
new
ExtHostTerminalService
(
threadService
));
const
extHostTerminalService
=
threadService
.
set
(
ExtHostContext
.
ExtHostTerminalService
,
new
ExtHostTerminalService
(
threadService
));
const
extHostSCM
=
threadService
.
set
(
ExtHostContext
.
ExtHostSCM
,
new
ExtHostSCM
(
threadService
,
extHostCommands
));
const
extHostSCM
=
threadService
.
set
(
ExtHostContext
.
ExtHostSCM
,
new
ExtHostSCM
(
threadService
,
extHostCommands
));
const
extHostTask
=
threadService
.
set
(
ExtHostContext
.
ExtHostTask
,
new
ExtHostTask
(
threadService
,
extHostWorkspace
));
const
extHostTask
=
threadService
.
set
(
ExtHostContext
.
ExtHostTask
,
new
ExtHostTask
(
threadService
,
extHostWorkspace
));
const
extHostCredentials
=
threadService
.
set
(
ExtHostContext
.
ExtHostCredentials
,
new
ExtHostCredentials
(
threadService
));
const
extHostWindow
=
threadService
.
set
(
ExtHostContext
.
ExtHostWindow
,
new
ExtHostWindow
(
threadService
));
const
extHostWindow
=
threadService
.
set
(
ExtHostContext
.
ExtHostWindow
,
new
ExtHostWindow
(
threadService
));
threadService
.
set
(
ExtHostContext
.
ExtHostExtensionService
,
extensionService
);
threadService
.
set
(
ExtHostContext
.
ExtHostExtensionService
,
extensionService
);
...
@@ -519,21 +517,8 @@ export function createApiFactory(
...
@@ -519,21 +517,8 @@ export function createApiFactory(
}
}
};
};
// namespace: credentials
const
credentials
=
{
readSecret
(
service
:
string
,
account
:
string
):
Thenable
<
string
|
undefined
>
{
return
extHostCredentials
.
readSecret
(
service
,
account
);
},
writeSecret
(
service
:
string
,
account
:
string
,
secret
:
string
):
Thenable
<
void
>
{
return
extHostCredentials
.
writeSecret
(
service
,
account
,
secret
);
},
deleteSecret
(
service
:
string
,
account
:
string
):
Thenable
<
boolean
>
{
return
extHostCredentials
.
deleteSecret
(
service
,
account
);
}
};
const
api
:
typeof
vscode
=
{
return
<
typeof
vscode
>
{
version
:
pkg
.
version
,
version
:
pkg
.
version
,
// namespaces
// namespaces
commands
,
commands
,
...
@@ -606,10 +591,6 @@ export function createApiFactory(
...
@@ -606,10 +591,6 @@ export function createApiFactory(
FileChangeType
:
<
any
>
FileChangeType
,
FileChangeType
:
<
any
>
FileChangeType
,
FileType
:
<
any
>
FileType
FileType
:
<
any
>
FileType
};
};
if
(
extension
.
enableProposedApi
&&
extension
.
isBuiltin
)
{
api
[
'
credentials
'
]
=
credentials
;
}
return
api
;
};
};
}
}
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
9ad5aeb6
...
@@ -417,12 +417,6 @@ export interface MainThreadDebugServiceShape extends IDisposable {
...
@@ -417,12 +417,6 @@ export interface MainThreadDebugServiceShape extends IDisposable {
$appendDebugConsole
(
value
:
string
):
TPromise
<
any
>
;
$appendDebugConsole
(
value
:
string
):
TPromise
<
any
>
;
}
}
export
interface
MainThreadCredentialsShape
extends
IDisposable
{
$readSecret
(
service
:
string
,
account
:
string
):
Thenable
<
string
|
undefined
>
;
$writeSecret
(
service
:
string
,
account
:
string
,
secret
:
string
):
Thenable
<
void
>
;
$deleteSecret
(
service
:
string
,
account
:
string
):
Thenable
<
boolean
>
;
}
export
interface
MainThreadWindowShape
extends
IDisposable
{
export
interface
MainThreadWindowShape
extends
IDisposable
{
$getWindowVisibility
():
TPromise
<
boolean
>
;
$getWindowVisibility
():
TPromise
<
boolean
>
;
}
}
...
@@ -641,9 +635,6 @@ export interface ExtHostDecorationsShape {
...
@@ -641,9 +635,6 @@ export interface ExtHostDecorationsShape {
$providerDecorations
(
handle
:
number
,
uri
:
URI
):
TPromise
<
DecorationData
>
;
$providerDecorations
(
handle
:
number
,
uri
:
URI
):
TPromise
<
DecorationData
>
;
}
}
export
interface
ExtHostCredentialsShape
{
}
export
interface
ExtHostWindowShape
{
export
interface
ExtHostWindowShape
{
$onDidChangeWindowFocus
(
value
:
boolean
):
void
;
$onDidChangeWindowFocus
(
value
:
boolean
):
void
;
}
}
...
@@ -677,7 +668,6 @@ export const MainContext = {
...
@@ -677,7 +668,6 @@ export const MainContext = {
MainThreadExtensionService
:
createMainId
<
MainThreadExtensionServiceShape
>
(
'
MainThreadExtensionService
'
),
MainThreadExtensionService
:
createMainId
<
MainThreadExtensionServiceShape
>
(
'
MainThreadExtensionService
'
),
MainThreadSCM
:
createMainId
<
MainThreadSCMShape
>
(
'
MainThreadSCM
'
),
MainThreadSCM
:
createMainId
<
MainThreadSCMShape
>
(
'
MainThreadSCM
'
),
MainThreadTask
:
createMainId
<
MainThreadTaskShape
>
(
'
MainThreadTask
'
),
MainThreadTask
:
createMainId
<
MainThreadTaskShape
>
(
'
MainThreadTask
'
),
MainThreadCredentials
:
createMainId
<
MainThreadCredentialsShape
>
(
'
MainThreadCredentials
'
),
MainThreadWindow
:
createMainId
<
MainThreadWindowShape
>
(
'
MainThreadWindow
'
),
MainThreadWindow
:
createMainId
<
MainThreadWindowShape
>
(
'
MainThreadWindow
'
),
};
};
...
@@ -703,6 +693,5 @@ export const ExtHostContext = {
...
@@ -703,6 +693,5 @@ export const ExtHostContext = {
ExtHostSCM
:
createExtId
<
ExtHostSCMShape
>
(
'
ExtHostSCM
'
),
ExtHostSCM
:
createExtId
<
ExtHostSCMShape
>
(
'
ExtHostSCM
'
),
ExtHostTask
:
createExtId
<
ExtHostTaskShape
>
(
'
ExtHostTask
'
),
ExtHostTask
:
createExtId
<
ExtHostTaskShape
>
(
'
ExtHostTask
'
),
ExtHostWorkspace
:
createExtId
<
ExtHostWorkspaceShape
>
(
'
ExtHostWorkspace
'
),
ExtHostWorkspace
:
createExtId
<
ExtHostWorkspaceShape
>
(
'
ExtHostWorkspace
'
),
ExtHostCredentials
:
createExtId
<
ExtHostCredentialsShape
>
(
'
ExtHostCredentials
'
),
ExtHostWindow
:
createExtId
<
ExtHostWindowShape
>
(
'
ExtHostWindow
'
),
ExtHostWindow
:
createExtId
<
ExtHostWindowShape
>
(
'
ExtHostWindow
'
),
};
};
src/vs/workbench/api/node/extHostCredentials.ts
已删除
100644 → 0
浏览文件 @
c561784a
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
MainContext
,
MainThreadCredentialsShape
,
ExtHostCredentialsShape
,
IMainContext
}
from
'
vs/workbench/api/node/extHost.protocol
'
;
export
class
ExtHostCredentials
implements
ExtHostCredentialsShape
{
private
_proxy
:
MainThreadCredentialsShape
;
constructor
(
mainContext
:
IMainContext
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadCredentials
);
}
readSecret
(
service
:
string
,
account
:
string
):
Thenable
<
string
|
undefined
>
{
return
this
.
_proxy
.
$readSecret
(
service
,
account
);
}
writeSecret
(
service
:
string
,
account
:
string
,
secret
:
string
):
Thenable
<
void
>
{
return
this
.
_proxy
.
$writeSecret
(
service
,
account
,
secret
);
}
deleteSecret
(
service
:
string
,
account
:
string
):
Thenable
<
boolean
>
{
return
this
.
_proxy
.
$deleteSecret
(
service
,
account
);
}
}
src/vs/workbench/electron-browser/main.ts
浏览文件 @
9ad5aeb6
...
@@ -39,8 +39,6 @@ import { URLChannelClient } from 'vs/platform/url/common/urlIpc';
...
@@ -39,8 +39,6 @@ import { URLChannelClient } from 'vs/platform/url/common/urlIpc';
import
{
IURLService
}
from
'
vs/platform/url/common/url
'
;
import
{
IURLService
}
from
'
vs/platform/url/common/url
'
;
import
{
WorkspacesChannelClient
}
from
'
vs/platform/workspaces/common/workspacesIpc
'
;
import
{
WorkspacesChannelClient
}
from
'
vs/platform/workspaces/common/workspacesIpc
'
;
import
{
IWorkspacesService
}
from
'
vs/platform/workspaces/common/workspaces
'
;
import
{
IWorkspacesService
}
from
'
vs/platform/workspaces/common/workspaces
'
;
import
{
ICredentialsService
}
from
'
vs/platform/credentials/common/credentials
'
;
import
{
CredentialsChannelClient
}
from
'
vs/platform/credentials/node/credentialsIpc
'
;
import
fs
=
require
(
'
fs
'
);
import
fs
=
require
(
'
fs
'
);
gracefulFs
.
gracefulify
(
fs
);
// enable gracefulFs
gracefulFs
.
gracefulify
(
fs
);
// enable gracefulFs
...
@@ -202,9 +200,6 @@ function createMainProcessServices(mainProcessClient: ElectronIPCClient): Servic
...
@@ -202,9 +200,6 @@ function createMainProcessServices(mainProcessClient: ElectronIPCClient): Servic
const
workspacesChannel
=
mainProcessClient
.
getChannel
(
'
workspaces
'
);
const
workspacesChannel
=
mainProcessClient
.
getChannel
(
'
workspaces
'
);
serviceCollection
.
set
(
IWorkspacesService
,
new
WorkspacesChannelClient
(
workspacesChannel
));
serviceCollection
.
set
(
IWorkspacesService
,
new
WorkspacesChannelClient
(
workspacesChannel
));
const
credentialsChannel
=
mainProcessClient
.
getChannel
(
'
credentials
'
);
serviceCollection
.
set
(
ICredentialsService
,
new
CredentialsChannelClient
(
credentialsChannel
));
return
serviceCollection
;
return
serviceCollection
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录