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

Issue 10823217: Create/Delete windows profile shortcuts (Closed)

Created:
8 years, 4 months ago by Halli
Modified:
8 years, 4 months ago
CC:
chromium-reviews, rginda+watch_chromium.org, rpetterson, SteveT, mgaba
Base URL:
https://src.chromium.org/chrome/trunk/src/
Visibility:
Public.

Description

Create and delete desktop shortcuts in general. Currently planning 6 steps for this feature: 1. (this step) Create/delete shortcuts in general (few edge cases) 2. Add functionality for the checkbox- allow the user to select whether they want a shortcut or not from the create/manage profile dialogs 3. Find shortcuts on the desktop by their arguments instead of the path. 4. Handle edge case of 1 to 2 and 2 to 1 profiles (adding/removing icon and name from the shortcut) 5. Update shortcuts when the user changes their name/icon 6. Repopulate shortcuts map when browser starts up (to allow delete/update on new browser instances) This CL depends on: Issue 10826188 BUG=133585 TEST=manual testing Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=151974

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 8

Patch Set 5 : #

Patch Set 6 : #

Total comments: 12

Patch Set 7 : Adding missing files #

Patch Set 8 : #

Total comments: 24

Patch Set 9 : #

Total comments: 10

Patch Set 10 : Reordered functions to match new order for profile_shortcut_manager.h #

Patch Set 11 : #

Total comments: 12

Patch Set 12 : #

Total comments: 8

Patch Set 13 : #

Total comments: 4

Patch Set 14 : #

Total comments: 22

Patch Set 15 : #

Total comments: 2

Patch Set 16 : #

Patch Set 17 : Modified shortcut tests to be Windows only and removed extra #includes from Profile Manager tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -392 lines) Patch
M chrome/browser/chrome_browser_main_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/profiles/avatar_menu_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_manager.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +3 lines, -21 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +17 lines, -45 lines 0 comments Download
M chrome/browser/profiles/profile_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +8 lines, -11 lines 0 comments Download
A chrome/browser/profiles/profile_shortcut_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +30 lines, -0 lines 0 comments Download
A chrome/browser/profiles/profile_shortcut_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/browser/profiles/profile_shortcut_manager_stub.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +105 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_shortcut_manager_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +98 lines, -300 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -1 line 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/base/testing_profile_manager.cc View 1 2 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
Halli
8 years, 4 months ago (2012-08-08 16:54:38 UTC) #1
sail
Hi Halli, normally we don't check in debug code. When checking in partially completed work ...
8 years, 4 months ago (2012-08-08 20:06:15 UTC) #2
sail
> When checking in partially completed work we put it behind a command line flag ...
8 years, 4 months ago (2012-08-08 20:06:46 UTC) #3
Halli
8 years, 4 months ago (2012-08-09 18:01:45 UTC) #4
SteveT
A few drive by nits (I haven't really looked at the rest of the code... ...
8 years, 4 months ago (2012-08-09 18:07:39 UTC) #5
Halli
http://codereview.chromium.org/10823217/diff/6002/chrome/browser/chrome_browser_main_win.cc File chrome/browser/chrome_browser_main_win.cc (right): http://codereview.chromium.org/10823217/diff/6002/chrome/browser/chrome_browser_main_win.cc#newcode139 chrome/browser/chrome_browser_main_win.cc:139: }*/ I just missed this one when deleting old ...
8 years, 4 months ago (2012-08-09 18:12:30 UTC) #6
Halli
Back to spaces for the gyp...
8 years, 4 months ago (2012-08-09 18:19:14 UTC) #7
sail
http://codereview.chromium.org/10823217/diff/6013/chrome/browser/profiles/avatar_menu_model.cc File chrome/browser/profiles/avatar_menu_model.cc (right): http://codereview.chromium.org/10823217/diff/6013/chrome/browser/profiles/avatar_menu_model.cc#newcode106 chrome/browser/profiles/avatar_menu_model.cc:106: // Temporarily generate a random icon/name pair to create ...
8 years, 4 months ago (2012-08-10 18:01:14 UTC) #8
Halli
http://codereview.chromium.org/10823217/diff/6013/chrome/browser/profiles/avatar_menu_model.cc File chrome/browser/profiles/avatar_menu_model.cc (right): http://codereview.chromium.org/10823217/diff/6013/chrome/browser/profiles/avatar_menu_model.cc#newcode106 chrome/browser/profiles/avatar_menu_model.cc:106: // Temporarily generate a random icon/name pair to create ...
8 years, 4 months ago (2012-08-13 21:50:10 UTC) #9
sail
http://codereview.chromium.org/10823217/diff/6013/chrome/browser/profiles/avatar_menu_model.cc File chrome/browser/profiles/avatar_menu_model.cc (right): http://codereview.chromium.org/10823217/diff/6013/chrome/browser/profiles/avatar_menu_model.cc#newcode106 chrome/browser/profiles/avatar_menu_model.cc:106: // Temporarily generate a random icon/name pair to create ...
8 years, 4 months ago (2012-08-13 22:09:36 UTC) #10
sail
http://codereview.chromium.org/10823217/diff/9006/chrome/browser/profiles/profile_manager_unittest.cc File chrome/browser/profiles/profile_manager_unittest.cc (right): http://codereview.chromium.org/10823217/diff/9006/chrome/browser/profiles/profile_manager_unittest.cc#newcode596 chrome/browser/profiles/profile_manager_unittest.cc:596: ASSERT_TRUE(file_util::ContainsPath(temp_dir_.path(), dest_path.Append( maybe file_util::PathExists() instead of ContainsPath() ? http://codereview.chromium.org/10823217/diff/9006/chrome/browser/profiles/profile_manager_unittest.cc#newcode599 ...
8 years, 4 months ago (2012-08-13 22:14:35 UTC) #11
Halli
http://codereview.chromium.org/10823217/diff/6013/chrome/browser/profiles/avatar_menu_model.cc File chrome/browser/profiles/avatar_menu_model.cc (right): http://codereview.chromium.org/10823217/diff/6013/chrome/browser/profiles/avatar_menu_model.cc#newcode106 chrome/browser/profiles/avatar_menu_model.cc:106: // Temporarily generate a random icon/name pair to create ...
8 years, 4 months ago (2012-08-14 18:25:56 UTC) #12
sail
http://codereview.chromium.org/10823217/diff/8008/chrome/browser/profiles/profile_manager.h File chrome/browser/profiles/profile_manager.h (right): http://codereview.chromium.org/10823217/diff/8008/chrome/browser/profiles/profile_manager.h#newcode297 chrome/browser/profiles/profile_manager.h:297: ProfileShortcutManager* profile_shortcut_manager_; should be scoped_ptr http://codereview.chromium.org/10823217/diff/8008/chrome/browser/profiles/profile_shortcut_manager.h File chrome/browser/profiles/profile_shortcut_manager.h (right): ...
8 years, 4 months ago (2012-08-14 18:40:41 UTC) #13
Halli
http://codereview.chromium.org/10823217/diff/8008/chrome/browser/profiles/profile_manager.h File chrome/browser/profiles/profile_manager.h (right): http://codereview.chromium.org/10823217/diff/8008/chrome/browser/profiles/profile_manager.h#newcode297 chrome/browser/profiles/profile_manager.h:297: ProfileShortcutManager* profile_shortcut_manager_; On 2012/08/14 18:40:41, sail wrote: > should ...
8 years, 4 months ago (2012-08-14 20:38:46 UTC) #14
sail
http://codereview.chromium.org/10823217/diff/10008/chrome/browser/profiles/profile_shortcut_manager_unittest.cc File chrome/browser/profiles/profile_shortcut_manager_unittest.cc (right): http://codereview.chromium.org/10823217/diff/10008/chrome/browser/profiles/profile_shortcut_manager_unittest.cc#newcode64 chrome/browser/profiles/profile_shortcut_manager_unittest.cc:64: profile_shortcut_manager->DeleteChromeDesktopShortcut(dest_path); maybe add a TODO to verify deletion? http://codereview.chromium.org/10823217/diff/10008/chrome/browser/profiles/profile_shortcut_manager_unittest.cc#newcode100 ...
8 years, 4 months ago (2012-08-14 20:53:17 UTC) #15
Halli
http://codereview.chromium.org/10823217/diff/10008/chrome/browser/profiles/profile_shortcut_manager_unittest.cc File chrome/browser/profiles/profile_shortcut_manager_unittest.cc (right): http://codereview.chromium.org/10823217/diff/10008/chrome/browser/profiles/profile_shortcut_manager_unittest.cc#newcode64 chrome/browser/profiles/profile_shortcut_manager_unittest.cc:64: profile_shortcut_manager->DeleteChromeDesktopShortcut(dest_path); On 2012/08/14 20:53:17, sail wrote: > maybe add ...
8 years, 4 months ago (2012-08-14 21:24:19 UTC) #16
sail
LGTM! http://codereview.chromium.org/10823217/diff/27/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): http://codereview.chromium.org/10823217/diff/27/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode137 chrome/browser/profiles/profile_shortcut_manager_win.cc:137: ProfileShortcutInfo() : flags(string16()), profile_name(string16()), I don't think you ...
8 years, 4 months ago (2012-08-14 21:34:57 UTC) #17
Halli
ben@ added for OWNERS approval for chrome and chrome/test http://codereview.chromium.org/10823217/diff/27/chrome/browser/profiles/profile_shortcut_manager_win.cc File chrome/browser/profiles/profile_shortcut_manager_win.cc (right): http://codereview.chromium.org/10823217/diff/27/chrome/browser/profiles/profile_shortcut_manager_win.cc#newcode137 chrome/browser/profiles/profile_shortcut_manager_win.cc:137: ...
8 years, 4 months ago (2012-08-14 22:19:47 UTC) #18
Ben Goodger (Google)
LGTM for chrome bits modulo my nits below: http://codereview.chromium.org/10823217/diff/3015/chrome/browser/profiles/profile_shortcut_manager.h File chrome/browser/profiles/profile_shortcut_manager.h (right): http://codereview.chromium.org/10823217/diff/3015/chrome/browser/profiles/profile_shortcut_manager.h#newcode16 chrome/browser/profiles/profile_shortcut_manager.h:16: ProfileShortcutManager(); ...
8 years, 4 months ago (2012-08-14 22:43:19 UTC) #19
Halli
http://codereview.chromium.org/10823217/diff/3015/chrome/browser/profiles/profile_shortcut_manager.h File chrome/browser/profiles/profile_shortcut_manager.h (right): http://codereview.chromium.org/10823217/diff/3015/chrome/browser/profiles/profile_shortcut_manager.h#newcode16 chrome/browser/profiles/profile_shortcut_manager.h:16: ProfileShortcutManager(); I get the following error when I remove ...
8 years, 4 months ago (2012-08-15 18:13:53 UTC) #20
Ben Goodger (Google)
Weird (re: the error). That shouldn't be necessary (or at least isn't in the various ...
8 years, 4 months ago (2012-08-15 18:18:49 UTC) #21
SteveT
Drive by 2! Various formatting things but looking pretty good... http://codereview.chromium.org/10823217/diff/7027/chrome/browser/chrome_browser_main_win.cc File chrome/browser/chrome_browser_main_win.cc (left): http://codereview.chromium.org/10823217/diff/7027/chrome/browser/chrome_browser_main_win.cc#oldcode138 ...
8 years, 4 months ago (2012-08-15 18:29:41 UTC) #22
Halli
http://codereview.chromium.org/10823217/diff/7027/chrome/browser/chrome_browser_main_win.cc File chrome/browser/chrome_browser_main_win.cc (left): http://codereview.chromium.org/10823217/diff/7027/chrome/browser/chrome_browser_main_win.cc#oldcode138 chrome/browser/chrome_browser_main_win.cc:138: VLOG(1) << "Failed to delete desktop profiles shortcuts."; Different ...
8 years, 4 months ago (2012-08-15 19:29:59 UTC) #23
SteveT
lgtm after you address my comment inline (which might apply to a few other places ...
8 years, 4 months ago (2012-08-15 19:49:31 UTC) #24
Halli
http://codereview.chromium.org/10823217/diff/15019/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): http://codereview.chromium.org/10823217/diff/15019/chrome/browser/profiles/profile_manager.cc#newcode272 chrome/browser/profiles/profile_manager.cc:272: profile_shortcut_manager_.reset(ProfileShortcutManager::Create()); On 2012/08/15 19:49:31, SteveT wrote: > Oops - ...
8 years, 4 months ago (2012-08-15 19:51:57 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hallielaine@chromium.org/10823217/38
8 years, 4 months ago (2012-08-15 19:52:21 UTC) #26
commit-bot: I haz the power
Try job failure for 10823217-38 (retry) on mac for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-15 21:41:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hallielaine@chromium.org/10823217/8063
8 years, 4 months ago (2012-08-16 19:14:18 UTC) #28
commit-bot: I haz the power
8 years, 4 months ago (2012-08-16 21:36:55 UTC) #29
Change committed as 151974

Powered by Google App Engine
This is Rietveld 408576698