Commit c92f12a4 authored by pkotwicz's avatar pkotwicz Committed by Commit bot

Remove unused stub_user_accounts_delegate.*

BUG=None
TEST=None
TBR=sky

Review URL: https://codereview.chromium.org/639183004

Cr-Commit-Position: refs/heads/master@{#299063}
parent 0553ad50
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/ash/stub_user_accounts_delegate.h"
#include <cctype>
#include "base/logging.h"
StubUserAccountsDelegate::StubUserAccountsDelegate(const std::string& owner_id)
: primary_account_(owner_id) {}
StubUserAccountsDelegate::~StubUserAccountsDelegate() {}
std::string StubUserAccountsDelegate::GetPrimaryAccountId() {
return primary_account_;
}
std::vector<std::string> StubUserAccountsDelegate::GetSecondaryAccountIds() {
return secondary_accounts_;
}
std::string StubUserAccountsDelegate::GetAccountDisplayName(
const std::string& account_id) {
std::string res(1, std::toupper(account_id[0]));
res += account_id.substr(1);
return res;
}
void StubUserAccountsDelegate::DeleteAccount(const std::string& account_id) {
secondary_accounts_.erase(
std::remove(
secondary_accounts_.begin(), secondary_accounts_.end(), account_id),
secondary_accounts_.end());
NotifyAccountListChanged();
}
void StubUserAccountsDelegate::AddAccount(const std::string& account_id) {
if (primary_account_ == account_id)
return;
if (std::find(secondary_accounts_.begin(),
secondary_accounts_.end(),
account_id) != secondary_accounts_.end())
return;
secondary_accounts_.push_back(account_id);
NotifyAccountListChanged();
}
void StubUserAccountsDelegate::LaunchAddAccountDialog() {
NOTIMPLEMENTED();
}
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_ASH_STUB_USER_ACCOUNTS_DELEGATE_H_
#define CHROME_BROWSER_UI_ASH_STUB_USER_ACCOUNTS_DELEGATE_H_
#include "ash/system/user/user_accounts_delegate.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
class StubUserAccountsDelegate : public ash::tray::UserAccountsDelegate {
public:
explicit StubUserAccountsDelegate(const std::string& owner_id);
virtual ~StubUserAccountsDelegate();
void AddAccount(const std::string& account);
// Overridden from ash::tray::UserAccountsDelegate:
virtual std::string GetPrimaryAccountId() override;
virtual std::vector<std::string> GetSecondaryAccountIds() override;
virtual std::string GetAccountDisplayName(const std::string& account_id)
override;
virtual void DeleteAccount(const std::string& account_id) override;
virtual void LaunchAddAccountDialog() override;
private:
std::string primary_account_;
std::vector<std::string> secondary_accounts_;
DISALLOW_COPY_AND_ASSIGN(StubUserAccountsDelegate);
};
#endif // CHROME_BROWSER_UI_ASH_STUB_USER_ACCOUNTS_DELEGATE_H_
...@@ -2412,8 +2412,6 @@ ...@@ -2412,8 +2412,6 @@
'browser/ui/ash/session_state_delegate_chromeos.h', 'browser/ui/ash/session_state_delegate_chromeos.h',
'browser/ui/ash/solid_color_user_wallpaper_delegate.cc', 'browser/ui/ash/solid_color_user_wallpaper_delegate.cc',
'browser/ui/ash/solid_color_user_wallpaper_delegate.h', 'browser/ui/ash/solid_color_user_wallpaper_delegate.h',
'browser/ui/ash/stub_user_accounts_delegate.cc',
'browser/ui/ash/stub_user_accounts_delegate.h',
'browser/ui/ash/system_tray_delegate_chromeos.cc', 'browser/ui/ash/system_tray_delegate_chromeos.cc',
'browser/ui/ash/system_tray_delegate_chromeos.h', 'browser/ui/ash/system_tray_delegate_chromeos.h',
'browser/ui/ash/system_tray_delegate_linux.cc', 'browser/ui/ash/system_tray_delegate_linux.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment