| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/ash/stub_user_accounts_delegate.h" | 5 #include "chrome/browser/ui/ash/stub_user_accounts_delegate.h" |
| 6 | 6 |
| 7 #include <cctype> | 7 #include <cctype> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| 11 StubUserAccountsDelegate::StubUserAccountsDelegate(const std::string& owner_id) | 11 StubUserAccountsDelegate::StubUserAccountsDelegate(const std::string& owner_id) |
| 12 : primary_account_(owner_id) {} | 12 : primary_account_(owner_id) {} |
| 13 | 13 |
| 14 StubUserAccountsDelegate::~StubUserAccountsDelegate() {} | 14 StubUserAccountsDelegate::~StubUserAccountsDelegate() {} |
| 15 | 15 |
| 16 std::string StubUserAccountsDelegate::GetPrimaryAccount() { | 16 std::string StubUserAccountsDelegate::GetPrimaryAccountId() { |
| 17 return primary_account_; | 17 return primary_account_; |
| 18 } | 18 } |
| 19 | 19 |
| 20 std::vector<std::string> StubUserAccountsDelegate::GetSecondaryAccountsList() { | 20 std::vector<std::string> StubUserAccountsDelegate::GetSecondaryAccountIds() { |
| 21 return secondary_accounts_; | 21 return secondary_accounts_; |
| 22 } | 22 } |
| 23 | 23 |
| 24 std::string StubUserAccountsDelegate::GetAccountDisplayName( | 24 std::string StubUserAccountsDelegate::GetAccountDisplayName( |
| 25 const std::string& account_id) { | 25 const std::string& account_id) { |
| 26 std::string res(1, std::toupper(account_id[0])); | 26 std::string res(1, std::toupper(account_id[0])); |
| 27 res += account_id.substr(1); | 27 res += account_id.substr(1); |
| 28 return res; | 28 return res; |
| 29 } | 29 } |
| 30 | 30 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 43 secondary_accounts_.end(), | 43 secondary_accounts_.end(), |
| 44 account_id) != secondary_accounts_.end()) | 44 account_id) != secondary_accounts_.end()) |
| 45 return; | 45 return; |
| 46 secondary_accounts_.push_back(account_id); | 46 secondary_accounts_.push_back(account_id); |
| 47 NotifyAccountListChanged(); | 47 NotifyAccountListChanged(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void StubUserAccountsDelegate::LaunchAddAccountDialog() { | 50 void StubUserAccountsDelegate::LaunchAddAccountDialog() { |
| 51 NOTIMPLEMENTED(); | 51 NOTIMPLEMENTED(); |
| 52 } | 52 } |
| OLD | NEW |