AccountService: Remove unused myAccount method
All UI screens now use the REST API to get the user account details. Change-Id: I336c597b2375686e30f162d2d148e8ba63920e3e
This commit is contained in:
parent
941dd462f0
commit
d481bc1e5b
@ -17,7 +17,6 @@ package com.google.gerrit.common.data;
|
||||
import com.google.gerrit.common.audit.Audit;
|
||||
import com.google.gerrit.common.auth.SignInRequired;
|
||||
import com.google.gerrit.extensions.client.DiffPreferencesInfo;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.AccountProjectWatch;
|
||||
import com.google.gwtjsonrpc.common.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.common.RemoteJsonService;
|
||||
@ -30,9 +29,6 @@ import java.util.Set;
|
||||
|
||||
@RpcImpl(version = Version.V2_0)
|
||||
public interface AccountService extends RemoteJsonService {
|
||||
@SignInRequired
|
||||
void myAccount(AsyncCallback<Account> callback);
|
||||
|
||||
@Audit
|
||||
@SignInRequired
|
||||
void changeDiffPreferences(DiffPreferencesInfo diffPref,
|
||||
|
@ -52,7 +52,6 @@ import java.util.Set;
|
||||
|
||||
class AccountServiceImpl extends BaseServiceImplementation implements
|
||||
AccountService {
|
||||
private final Provider<IdentifiedUser> currentUser;
|
||||
private final ProjectControl.Factory projectControlFactory;
|
||||
private final AgreementInfoFactory.Factory agreementInfoFactory;
|
||||
private final Provider<ChangeQueryBuilder> queryBuilder;
|
||||
@ -66,23 +65,12 @@ class AccountServiceImpl extends BaseServiceImplementation implements
|
||||
final Provider<ChangeQueryBuilder> queryBuilder,
|
||||
SetDiffPreferences setDiff) {
|
||||
super(schema, identifiedUser);
|
||||
this.currentUser = identifiedUser;
|
||||
this.projectControlFactory = projectControlFactory;
|
||||
this.agreementInfoFactory = agreementInfoFactory;
|
||||
this.queryBuilder = queryBuilder;
|
||||
this.setDiff = setDiff;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void myAccount(final AsyncCallback<Account> callback) {
|
||||
run(callback, new Action<Account>() {
|
||||
@Override
|
||||
public Account run(ReviewDb db) throws OrmException {
|
||||
return db.accounts().get(currentUser.get().getAccountId());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeDiffPreferences(final DiffPreferencesInfo diffPref,
|
||||
AsyncCallback<VoidResult> callback) {
|
||||
|
Loading…
Reference in New Issue
Block a user