Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Unified Diff: ui/app_list/app_list_model.h

Issue 22268009: Move signin status and current user information into AppListModel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/app_list/app_list_model.h
diff --git a/ui/app_list/app_list_model.h b/ui/app_list/app_list_model.h
index 4c46a0123297d05aed9d25ece397e5506475c711..196adc44cf24ed19ce9fd3747b05794bec986720 100644
--- a/ui/app_list/app_list_model.h
+++ b/ui/app_list/app_list_model.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
+#include "base/strings/string16.h"
#include "ui/app_list/app_list_export.h"
#include "ui/base/models/list_model.h"
@@ -39,11 +40,19 @@ class APP_LIST_EXPORT AppListModel {
void RemoveObserver(AppListModelObserver* observer);
void SetStatus(Status status);
+ void SetCurrentUser(const base::string16& current_user_name,
+ const base::string16& current_user_email);
+ void SetSignedIn(bool signed_in);
Apps* apps() { return apps_.get(); }
SearchBoxModel* search_box() { return search_box_.get(); }
SearchResults* results() { return results_.get(); }
Status status() const { return status_; }
+ bool signed_in() const { return signed_in_; }
+ const base::string16& current_user_name() const { return current_user_name_; }
+ const base::string16& current_user_email() const {
+ return current_user_email_;
+ }
private:
scoped_ptr<Apps> apps_;
@@ -51,6 +60,10 @@ class APP_LIST_EXPORT AppListModel {
scoped_ptr<SearchBoxModel> search_box_;
scoped_ptr<SearchResults> results_;
+ base::string16 current_user_name_;
+ base::string16 current_user_email_;
+ bool signed_in_;
+
Status status_;
ObserverList<AppListModelObserver> observers_;

Powered by Google App Engine
This is Rietveld 408576698