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

Side by Side Diff: chrome/browser/ui/webui/options/manage_profile_handler.cc

Issue 267253004: Fetch a new GAIA picture every time chrome://settings/manageProfile comes up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move the chrome messages to a common place Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/options/manage_profile_handler.h ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chrome/browser/ui/webui/options/manage_profile_handler.h" 5 #include "chrome/browser/ui/webui/options/manage_profile_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 web_ui()->RegisterMessageCallback("switchAppListProfile", 175 web_ui()->RegisterMessageCallback("switchAppListProfile",
176 base::Bind(&ManageProfileHandler::SwitchAppListProfile, 176 base::Bind(&ManageProfileHandler::SwitchAppListProfile,
177 base::Unretained(this))); 177 base::Unretained(this)));
178 #endif 178 #endif
179 web_ui()->RegisterMessageCallback("addProfileShortcut", 179 web_ui()->RegisterMessageCallback("addProfileShortcut",
180 base::Bind(&ManageProfileHandler::AddProfileShortcut, 180 base::Bind(&ManageProfileHandler::AddProfileShortcut,
181 base::Unretained(this))); 181 base::Unretained(this)));
182 web_ui()->RegisterMessageCallback("removeProfileShortcut", 182 web_ui()->RegisterMessageCallback("removeProfileShortcut",
183 base::Bind(&ManageProfileHandler::RemoveProfileShortcut, 183 base::Bind(&ManageProfileHandler::RemoveProfileShortcut,
184 base::Unretained(this))); 184 base::Unretained(this)));
185 web_ui()->RegisterMessageCallback("refreshGaiaPicture",
186 base::Bind(&ManageProfileHandler::RefreshGaiaPicture,
187 base::Unretained(this)));
185 } 188 }
186 189
187 void ManageProfileHandler::Uninitialize() { 190 void ManageProfileHandler::Uninitialize() {
188 registrar_.RemoveAll(); 191 registrar_.RemoveAll();
189 } 192 }
190 193
191 void ManageProfileHandler::Observe( 194 void ManageProfileHandler::Observe(
192 int type, 195 int type,
193 const content::NotificationSource& source, 196 const content::NotificationSource& source,
194 const content::NotificationDetails& details) { 197 const content::NotificationDetails& details) {
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 ProfileShortcutManager* shortcut_manager = 516 ProfileShortcutManager* shortcut_manager =
514 g_browser_process->profile_manager()->profile_shortcut_manager(); 517 g_browser_process->profile_manager()->profile_shortcut_manager();
515 DCHECK(shortcut_manager); 518 DCHECK(shortcut_manager);
516 519
517 shortcut_manager->RemoveProfileShortcuts(profile_file_path); 520 shortcut_manager->RemoveProfileShortcuts(profile_file_path);
518 521
519 // Update the UI buttons. 522 // Update the UI buttons.
520 OnHasProfileShortcuts(false); 523 OnHasProfileShortcuts(false);
521 } 524 }
522 525
526 void ManageProfileHandler::RefreshGaiaPicture(const base::ListValue* args) {
527 profiles::UpdateGaiaProfilePhotoIfNeeded(Profile::FromWebUI(web_ui()));
528 }
529
523 } // namespace options 530 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/manage_profile_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698