OLD | NEW |
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 #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/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 251 |
252 ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::PROFILE_DELETED); | 252 ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::PROFILE_DELETED); |
253 | 253 |
254 const Value* file_path_value; | 254 const Value* file_path_value; |
255 FilePath profile_file_path; | 255 FilePath profile_file_path; |
256 if (!args->Get(0, &file_path_value) || | 256 if (!args->Get(0, &file_path_value) || |
257 !base::GetValueAsFilePath(*file_path_value, &profile_file_path)) | 257 !base::GetValueAsFilePath(*file_path_value, &profile_file_path)) |
258 return; | 258 return; |
259 | 259 |
260 Browser* browser = | 260 Browser* browser = |
261 browser::FindBrowserWithWebContents(web_ui()->GetWebContents()); | 261 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents()); |
262 chrome::HostDesktopType desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE; | 262 chrome::HostDesktopType desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE; |
263 if (browser) | 263 if (browser) |
264 desktop_type = browser->host_desktop_type(); | 264 desktop_type = browser->host_desktop_type(); |
265 | 265 |
266 g_browser_process->profile_manager()->ScheduleProfileForDeletion( | 266 g_browser_process->profile_manager()->ScheduleProfileForDeletion( |
267 profile_file_path, desktop_type); | 267 profile_file_path, desktop_type); |
268 } | 268 } |
269 | 269 |
270 void ManageProfileHandler::ProfileIconSelectionChanged( | 270 void ManageProfileHandler::ProfileIconSelectionChanged( |
271 const base::ListValue* args) { | 271 const base::ListValue* args) { |
(...skipping 27 matching lines...) Expand all Loading... |
299 string16 gaia_name = cache.GetGAIANameOfProfileAtIndex(i); | 299 string16 gaia_name = cache.GetGAIANameOfProfileAtIndex(i); |
300 if (gaia_name.empty()) | 300 if (gaia_name.empty()) |
301 return; | 301 return; |
302 | 302 |
303 StringValue gaia_name_value(gaia_name); | 303 StringValue gaia_name_value(gaia_name); |
304 web_ui()->CallJavascriptFunction("ManageProfileOverlay.setProfileName", | 304 web_ui()->CallJavascriptFunction("ManageProfileOverlay.setProfileName", |
305 gaia_name_value); | 305 gaia_name_value); |
306 } | 306 } |
307 | 307 |
308 } // namespace options | 308 } // namespace options |
OLD | NEW |