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/profiles/profile_shortcut_manager_win.h" | 5 #include "chrome/browser/profiles/profile_shortcut_manager_win.h" |
6 | 6 |
7 #include <shlobj.h> // For SHChangeNotify(). | 7 #include <shlobj.h> // For SHChangeNotify(). |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 if (base::PathExists(possible_old_system_shortcut)) | 362 if (base::PathExists(possible_old_system_shortcut)) |
363 base::CopyFile(possible_old_system_shortcut, new_shortcut_path); | 363 base::CopyFile(possible_old_system_shortcut, new_shortcut_path); |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 struct CreateOrUpdateShortcutsParams { | 367 struct CreateOrUpdateShortcutsParams { |
368 CreateOrUpdateShortcutsParams( | 368 CreateOrUpdateShortcutsParams( |
369 base::FilePath profile_path, | 369 base::FilePath profile_path, |
370 ProfileShortcutManagerWin::CreateOrUpdateMode create_mode, | 370 ProfileShortcutManagerWin::CreateOrUpdateMode create_mode, |
371 ProfileShortcutManagerWin::NonProfileShortcutAction action) | 371 ProfileShortcutManagerWin::NonProfileShortcutAction action) |
372 : profile_path(profile_path), create_mode(create_mode), action(action) {} | 372 : create_mode(create_mode), action(action), profile_path(profile_path) {} |
373 ~CreateOrUpdateShortcutsParams() {} | 373 ~CreateOrUpdateShortcutsParams() {} |
374 | 374 |
375 ProfileShortcutManagerWin::CreateOrUpdateMode create_mode; | 375 ProfileShortcutManagerWin::CreateOrUpdateMode create_mode; |
376 ProfileShortcutManagerWin::NonProfileShortcutAction action; | 376 ProfileShortcutManagerWin::NonProfileShortcutAction action; |
377 | 377 |
378 // The path for this profile. | 378 // The path for this profile. |
379 base::FilePath profile_path; | 379 base::FilePath profile_path; |
380 // The profile name before this update. Empty on create. | 380 // The profile name before this update. Empty on create. |
381 base::string16 old_profile_name; | 381 base::string16 old_profile_name; |
382 // The new profile name. | 382 // The new profile name. |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 // Ensure the profile's icon file has been created. | 865 // Ensure the profile's icon file has been created. |
866 CreateOrUpdateProfileIcon(profile->GetPath()); | 866 CreateOrUpdateProfileIcon(profile->GetPath()); |
867 } | 867 } |
868 break; | 868 break; |
869 } | 869 } |
870 default: | 870 default: |
871 NOTREACHED(); | 871 NOTREACHED(); |
872 break; | 872 break; |
873 } | 873 } |
874 } | 874 } |
OLD | NEW |