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

Side by Side Diff: chrome/browser/ui/webui/settings/settings_manage_profile_handler.h

Issue 1871653002: Settings People Revamp: Update ManageProfileHandler to use Promises. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 23 matching lines...) Expand all
34 void OnProfileAvatarChanged(const base::FilePath& profile_path) override; 34 void OnProfileAvatarChanged(const base::FilePath& profile_path) override;
35 35
36 private: 36 private:
37 FRIEND_TEST_ALL_PREFIXES(ManageProfileHandlerTest, SetProfileIconAndName); 37 FRIEND_TEST_ALL_PREFIXES(ManageProfileHandlerTest, SetProfileIconAndName);
38 FRIEND_TEST_ALL_PREFIXES(ManageProfileHandlerTest, GetAvailableIcons); 38 FRIEND_TEST_ALL_PREFIXES(ManageProfileHandlerTest, GetAvailableIcons);
39 39
40 // Callback for the "getAvailableIcons" message. 40 // Callback for the "getAvailableIcons" message.
41 // Sends the array of default profile icon URLs and profile names to WebUI. 41 // Sends the array of default profile icon URLs and profile names to WebUI.
42 void HandleGetAvailableIcons(const base::ListValue* args); 42 void HandleGetAvailableIcons(const base::ListValue* args);
43 43
44 // Send all the available profile icons to choose from. 44 // Get all the available profile icons to choose from.
45 void SendAvailableIcons(); 45 scoped_ptr<base::ListValue> GetAvailableIcons();
46 46
47 // Callback for the "setProfileIconAndName" message. Sets the name and icon 47 // Callback for the "setProfileIconAndName" message. Sets the name and icon
48 // of a given profile. 48 // of a given profile.
49 // |args| is of the form: [ 49 // |args| is of the form: [
50 // /*string*/ newProfileIconURL 50 // /*string*/ newProfileIconURL
51 // /*string*/ newProfileName, 51 // /*string*/ newProfileName,
52 // ] 52 // ]
53 void HandleSetProfileIconAndName(const base::ListValue* args); 53 void HandleSetProfileIconAndName(const base::ListValue* args);
54 54
55 // Callback for the "requestHasProfileShortcuts" message, which is called 55 // Callback for the "requestHasProfileShortcuts" message, which is called
(...skipping 27 matching lines...) Expand all
83 83
84 // For generating weak pointers to itself for callbacks. 84 // For generating weak pointers to itself for callbacks.
85 base::WeakPtrFactory<ManageProfileHandler> weak_factory_; 85 base::WeakPtrFactory<ManageProfileHandler> weak_factory_;
86 86
87 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler); 87 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler);
88 }; 88 };
89 89
90 } // namespace settings 90 } // namespace settings
91 91
92 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_ 92 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698