Chromium Code Reviews| Index: ui/app_list/app_list_model.cc |
| diff --git a/ui/app_list/app_list_model.cc b/ui/app_list/app_list_model.cc |
| index 4f473efbc36a7fe0e134522219338ae7f13e0dc4..2a5e1b86fd0f923cae7300f8b6919367b8efe227 100644 |
| --- a/ui/app_list/app_list_model.cc |
| +++ b/ui/app_list/app_list_model.cc |
| @@ -15,6 +15,7 @@ AppListModel::AppListModel() |
| : apps_(new Apps), |
| search_box_(new SearchBoxModel), |
| results_(new SearchResults), |
| + signed_in_(false), |
| status_(STATUS_NORMAL) { |
| } |
| @@ -39,4 +40,26 @@ void AppListModel::SetStatus(Status status) { |
| OnAppListModelStatusChanged()); |
| } |
| +void AppListModel::SetCurrentUser(const base::string16& current_user_name, |
| + const base::string16& current_user_email) { |
| + if (current_user_name_ == current_user_name && |
| + current_user_email_ == current_user_email) { |
| + return; |
| + } |
| + current_user_name_ = current_user_name; |
| + current_user_email_ = current_user_email; |
| + FOR_EACH_OBSERVER(AppListModelObserver, |
| + observers_, |
| + OnAppListModelCurrentUserChanged()); |
| +} |
| + |
| +void AppListModel::SetSignedIn(bool signed_in) { |
| + if (signed_in_ == signed_in) |
| + return; |
|
tapted
2013/08/14 03:53:11
nit: blank line after early return
calamity
2013/08/14 09:19:00
Done.
|
| + signed_in_ = signed_in; |
| + FOR_EACH_OBSERVER(AppListModelObserver, |
| + observers_, |
| + OnAppListModelSigninStatusChanged()); |
| +} |
| + |
| } // namespace app_list |