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

Side by Side Diff: chrome/browser/ui/app_list/model_pref_updater.h

Issue 599343002: Mirror app list hierarchy data in profile prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app_list_folder_pref
Patch Set: add unit test Created 6 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_APP_LIST_MODEL_PREF_UPDATER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_MODEL_PREF_UPDATER_H_
7
8 #include "base/macros.h"
9 #include "ui/app_list/app_list_model_observer.h"
10
11 namespace app_list {
12
13 class AppListModel;
14 class AppListPrefs;
15
16 // A class which listens to an AppListModel and updates the local pref model of
17 // the app list accordingly.
18 class ModelPrefUpdater : public AppListModelObserver {
19 public:
20 ModelPrefUpdater(AppListPrefs* app_list_prefs, AppListModel* model);
21 virtual ~ModelPrefUpdater();
22
23 // Overridden from AppListModelObserver:
24 virtual void OnAppListItemAdded(AppListItem* item) OVERRIDE;
25 virtual void OnAppListItemWillBeDeleted(AppListItem* item) OVERRIDE;
26 virtual void OnAppListItemUpdated(AppListItem* item) OVERRIDE;
27
28 private:
29 void UpdatePrefsFromAppListItem(AppListItem* item);
30
31 AppListPrefs* app_list_prefs_;
32 AppListModel* model_;
33
34 DISALLOW_COPY_AND_ASSIGN(ModelPrefUpdater);
35 };
36
37 } // namespace app_list
38
39 #endif // CHROME_BROWSER_UI_APP_LIST_MODEL_PREF_UPDATER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_syncable_service.cc ('k') | chrome/browser/ui/app_list/model_pref_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698