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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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 29 matching lines...) Expand all
40 40
41 app_list::AppListSyncableService* service() { return service_; } 41 app_list::AppListSyncableService* service() { return service_; }
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(scoped_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.
53 void RemoveApp(const std::string& id); 53 void RemoveApp(const std::string& id);
54 54
55 const app_list::AppListSyncableService::SyncItem* GetSyncItem( 55 const app_list::AppListSyncableService::SyncItem* GetSyncItem(
56 const std::string& id); 56 const std::string& id);
57 57
58 // Returns app instance matching |id| or nullptr. 58 // Returns app instance matching |id| or nullptr.
59 app_list::AppListItem* GetAppItem(const std::string& id); 59 app_list::AppListItem* GetAppItem(const std::string& id);
60 60
61 private: 61 private:
62 // Unowned pointers to the service that owns this and associated profile. 62 // Unowned pointers to the service that owns this and associated profile.
63 app_list::AppListSyncableService* service_ = nullptr; 63 app_list::AppListSyncableService* service_ = nullptr;
64 Profile* profile_ = nullptr; 64 Profile* profile_ = nullptr;
65 65
66 // Unowned pointer to the app list model. 66 // Unowned pointer to the app list model.
67 app_list::AppListModel* model_ = nullptr; 67 app_list::AppListModel* model_ = nullptr;
68 68
69 // Unowned pointer to the app list controller. 69 // Unowned pointer to the app list controller.
70 AppListControllerDelegate* controller_; 70 AppListControllerDelegate* controller_;
71 71
72 // Global constant defined for each item type. 72 // Global constant defined for each item type.
73 const char* item_type_; 73 const char* item_type_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(AppListModelBuilder); 75 DISALLOW_COPY_AND_ASSIGN(AppListModelBuilder);
76 }; 76 };
77 77
78 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_MODEL_BUILDER_H_ 78 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_MODEL_BUILDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_context_menu_unittest.cc ('k') | 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