| OLD | NEW |
| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 NULL | 147 NULL |
| 148 }, { | 148 }, { |
| 149 // For Win7, create_in_quick_launch_bar means pinning to taskbar. | 149 // For Win7, create_in_quick_launch_bar means pinning to taskbar. |
| 150 base::DIR_APP_DATA, | 150 base::DIR_APP_DATA, |
| 151 (base::win::GetVersion() >= base::win::VERSION_WIN7) ? | 151 (base::win::GetVersion() >= base::win::VERSION_WIN7) ? |
| 152 L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar" : | 152 L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar" : |
| 153 L"Microsoft\\Internet Explorer\\Quick Launch" | 153 L"Microsoft\\Internet Explorer\\Quick Launch" |
| 154 } | 154 } |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 for (int i = 0; i < arraysize(locations); ++i) { | 157 for (size_t i = 0; i < arraysize(locations); ++i) { |
| 158 base::FilePath path; | 158 base::FilePath path; |
| 159 if (!PathService::Get(locations[i].location_id, &path)) { | 159 if (!PathService::Get(locations[i].location_id, &path)) { |
| 160 NOTREACHED(); | 160 NOTREACHED(); |
| 161 continue; | 161 continue; |
| 162 } | 162 } |
| 163 | 163 |
| 164 if (locations[i].sub_dir != NULL) | 164 if (locations[i].sub_dir != NULL) |
| 165 path = path.Append(locations[i].sub_dir); | 165 path = path.Append(locations[i].sub_dir); |
| 166 | 166 |
| 167 base::FilePath shortcut_file = path.Append(file_name_). | 167 base::FilePath shortcut_file = path.Append(file_name_). |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 base::Unretained(this))); | 238 base::Unretained(this))); |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 | 241 |
| 242 void UpdateShortcutWorker::DeleteMeOnUIThread() { | 242 void UpdateShortcutWorker::DeleteMeOnUIThread() { |
| 243 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 243 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 244 delete this; | 244 delete this; |
| 245 } | 245 } |
| 246 | 246 |
| 247 } // namespace web_app | 247 } // namespace web_app |
| OLD | NEW |