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

Side by Side Diff: chrome/browser/ui/ash/chrome_launcher_prefs.h

Issue 2378353002: [Merge-M54] Fix crash on item drag in shelf. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/chrome_launcher_prefs.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_ASH_CHROME_LAUNCHER_PREFS_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_
6 #define CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_ 6 #define CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Get the list of pinned apps from preferences. 72 // Get the list of pinned apps from preferences.
73 std::vector<std::string> GetPinnedAppsFromPrefs( 73 std::vector<std::string> GetPinnedAppsFromPrefs(
74 const PrefService* prefs, 74 const PrefService* prefs,
75 LauncherControllerHelper* helper); 75 LauncherControllerHelper* helper);
76 76
77 // Removes information about pin position from sync model for the app. 77 // Removes information about pin position from sync model for the app.
78 void RemovePinPosition(Profile* profile, const std::string& app_id); 78 void RemovePinPosition(Profile* profile, const std::string& app_id);
79 79
80 // Updates information about pin position in sync model for the app |app_id|. 80 // Updates information about pin position in sync model for the app |app_id|.
81 // |app_id_before| optionally specifies an app that exists right before the 81 // |app_id_before| optionally specifies an app that exists right before the
82 // target app. |app_id_after| optionally specifies an app that exists right 82 // target app. |app_ids_after| optionally specifies sorted by position apps that
83 // after the target app. 83 // exist right after the target app.
84 void SetPinPosition(Profile* profile, 84 void SetPinPosition(Profile* profile,
85 const std::string& app_id, 85 const std::string& app_id,
86 const std::string& app_id_before, 86 const std::string& app_id_before,
87 const std::string& app_id_after); 87 const std::vector<std::string>& app_ids_after);
88 88
89 // Used to propagate remote preferences to local during the first run. 89 // Used to propagate remote preferences to local during the first run.
90 class ChromeLauncherPrefsObserver 90 class ChromeLauncherPrefsObserver
91 : public syncable_prefs::PrefServiceSyncableObserver { 91 : public syncable_prefs::PrefServiceSyncableObserver {
92 public: 92 public:
93 // Creates and returns an instance of ChromeLauncherPrefsObserver if the 93 // Creates and returns an instance of ChromeLauncherPrefsObserver if the
94 // profile prefs do not contain all the necessary local settings for the 94 // profile prefs do not contain all the necessary local settings for the
95 // shelf. If the local settings are present, returns null. 95 // shelf. If the local settings are present, returns null.
96 static std::unique_ptr<ChromeLauncherPrefsObserver> CreateIfNecessary( 96 static std::unique_ptr<ChromeLauncherPrefsObserver> CreateIfNecessary(
97 Profile* profile); 97 Profile* profile);
(...skipping 10 matching lines...) Expand all
108 // Profile prefs. Not owned. 108 // Profile prefs. Not owned.
109 syncable_prefs::PrefServiceSyncable* prefs_; 109 syncable_prefs::PrefServiceSyncable* prefs_;
110 110
111 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherPrefsObserver); 111 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherPrefsObserver);
112 }; 112 };
113 113
114 } // namespace launcher 114 } // namespace launcher
115 } // namespace ash 115 } // namespace ash
116 116
117 #endif // CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_ 117 #endif // CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/chrome_launcher_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698