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

Side by Side Diff: chrome/browser/web_applications/update_shortcut_worker_win.cc

Issue 2909943003: Removing useless Win7 checks + standardize its use (Closed)
Patch Set: Various nits Created 3 years, 6 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
« no previous file with comments | « chrome/browser/unload_browsertest.cc ('k') | chrome/browser/web_applications/web_app_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/web_applications/update_shortcut_worker_win.h" 5 #include "chrome/browser/web_applications/update_shortcut_worker_win.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "base/win/shortcut.h" 17 #include "base/win/shortcut.h"
18 #include "base/win/windows_version.h"
19 #include "chrome/browser/chrome_notification_types.h" 18 #include "chrome/browser/chrome_notification_types.h"
20 #include "chrome/browser/extensions/tab_helper.h" 19 #include "chrome/browser/extensions/tab_helper.h"
21 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/shell_integration_win.h" 21 #include "chrome/browser/shell_integration_win.h"
23 #include "chrome/browser/web_applications/web_app.h" 22 #include "chrome/browser/web_applications/web_app.h"
24 #include "chrome/browser/web_applications/web_app_win.h" 23 #include "chrome/browser/web_applications/web_app_win.h"
25 #include "components/favicon_base/select_favicon_frames.h" 24 #include "components/favicon_base/select_favicon_frames.h"
26 #include "content/public/browser/browser_thread.h" 25 #include "content/public/browser/browser_thread.h"
27 #include "content/public/browser/notification_details.h" 26 #include "content/public/browser/notification_details.h"
28 #include "content/public/browser/notification_source.h" 27 #include "content/public/browser/notification_source.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } locations[] = { 151 } locations[] = {
153 { 152 {
154 base::DIR_USER_DESKTOP, 153 base::DIR_USER_DESKTOP,
155 NULL 154 NULL
156 }, { 155 }, {
157 base::DIR_START_MENU, 156 base::DIR_START_MENU,
158 NULL 157 NULL
159 }, { 158 }, {
160 // For Win7, create_in_quick_launch_bar means pinning to taskbar. 159 // For Win7, create_in_quick_launch_bar means pinning to taskbar.
161 base::DIR_APP_DATA, 160 base::DIR_APP_DATA,
162 (base::win::GetVersion() >= base::win::VERSION_WIN7) ? 161 L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar"
163 L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar" :
164 L"Microsoft\\Internet Explorer\\Quick Launch"
165 } 162 }
166 }; 163 };
167 164
168 for (size_t i = 0; i < arraysize(locations); ++i) { 165 for (size_t i = 0; i < arraysize(locations); ++i) {
169 base::FilePath path; 166 base::FilePath path;
170 if (!PathService::Get(locations[i].location_id, &path)) { 167 if (!PathService::Get(locations[i].location_id, &path)) {
171 NOTREACHED(); 168 NOTREACHED();
172 continue; 169 continue;
173 } 170 }
174 171
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 base::Unretained(this))); 246 base::Unretained(this)));
250 } 247 }
251 } 248 }
252 249
253 void UpdateShortcutWorker::DeleteMeOnUIThread() { 250 void UpdateShortcutWorker::DeleteMeOnUIThread() {
254 DCHECK_CURRENTLY_ON(BrowserThread::UI); 251 DCHECK_CURRENTLY_ON(BrowserThread::UI);
255 delete this; 252 delete this;
256 } 253 }
257 254
258 } // namespace web_app 255 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/unload_browsertest.cc ('k') | chrome/browser/web_applications/web_app_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698