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

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

Issue 2316273004: [Merge-M53] arc: Don't sync app list change caused by Arc opt out. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_model_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_MODEL_BUILDER_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_MODEL_BUILDER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_MODEL_BUILDER_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_MODEL_BUILDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 Profile* profile() { return profile_; } 43 Profile* profile() { return profile_; }
44 44
45 AppListControllerDelegate* controller() { return controller_; } 45 AppListControllerDelegate* controller() { return controller_; }
46 46
47 app_list::AppListModel* model() { return model_; } 47 app_list::AppListModel* model() { return model_; }
48 48
49 // Inserts an app based on app ordinal prefs. 49 // Inserts an app based on app ordinal prefs.
50 void InsertApp(std::unique_ptr<app_list::AppListItem> app); 50 void InsertApp(std::unique_ptr<app_list::AppListItem> app);
51 51
52 // Removes an app based on app id. 52 // Removes an app based on app id. If |unsynced_change| is set to true then
53 void RemoveApp(const std::string& id); 53 // app is removed only from model and sync service is not used.
54 void RemoveApp(const std::string& id, bool unsynced_change);
54 55
55 const app_list::AppListSyncableService::SyncItem* GetSyncItem( 56 const app_list::AppListSyncableService::SyncItem* GetSyncItem(
56 const std::string& id); 57 const std::string& id);
57 58
58 // Returns app instance matching |id| or nullptr. 59 // Returns app instance matching |id| or nullptr.
59 app_list::AppListItem* GetAppItem(const std::string& id); 60 app_list::AppListItem* GetAppItem(const std::string& id);
60 61
61 private: 62 private:
62 // Unowned pointers to the service that owns this and associated profile. 63 // Unowned pointers to the service that owns this and associated profile.
63 app_list::AppListSyncableService* service_ = nullptr; 64 app_list::AppListSyncableService* service_ = nullptr;
64 Profile* profile_ = nullptr; 65 Profile* profile_ = nullptr;
65 66
66 // Unowned pointer to the app list model. 67 // Unowned pointer to the app list model.
67 app_list::AppListModel* model_ = nullptr; 68 app_list::AppListModel* model_ = nullptr;
68 69
69 // Unowned pointer to the app list controller. 70 // Unowned pointer to the app list controller.
70 AppListControllerDelegate* controller_; 71 AppListControllerDelegate* controller_;
71 72
72 // Global constant defined for each item type. 73 // Global constant defined for each item type.
73 const char* item_type_; 74 const char* item_type_;
74 75
75 DISALLOW_COPY_AND_ASSIGN(AppListModelBuilder); 76 DISALLOW_COPY_AND_ASSIGN(AppListModelBuilder);
76 }; 77 };
77 78
78 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_MODEL_BUILDER_H_ 79 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_MODEL_BUILDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_model_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698