| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <ApplicationServices/ApplicationServices.h> | 5 #include <ApplicationServices/ApplicationServices.h> |
| 6 #import <Cocoa/Cocoa.h> | 6 #import <Cocoa/Cocoa.h> |
| 7 | 7 |
| 8 #include "apps/app_shim/app_shim_handler_mac.h" | 8 #include "apps/app_shim/app_shim_handler_mac.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 if (enable) { | 187 if (enable) { |
| 188 content::BrowserThread::PostTask( | 188 content::BrowserThread::PostTask( |
| 189 content::BrowserThread::UI, FROM_HERE, | 189 content::BrowserThread::UI, FROM_HERE, |
| 190 base::Bind(&CreateAppListShim, profile_path)); | 190 base::Bind(&CreateAppListShim, profile_path)); |
| 191 return; | 191 return; |
| 192 } | 192 } |
| 193 | 193 |
| 194 // Sanity check because deleting things recursively is scary. | 194 // Sanity check because deleting things recursively is scary. |
| 195 CHECK(install_path.MatchesExtension(".app")); | 195 CHECK(install_path.MatchesExtension(".app")); |
| 196 base::Delete(install_path, true /* recursive */); | 196 base::DeleteFile(install_path, true /* recursive */); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void CreateShortcutsInDefaultLocation( | 199 void CreateShortcutsInDefaultLocation( |
| 200 const ShellIntegration::ShortcutInfo& shortcut_info) { | 200 const ShellIntegration::ShortcutInfo& shortcut_info) { |
| 201 web_app::CreateShortcuts(shortcut_info, | 201 web_app::CreateShortcuts(shortcut_info, |
| 202 ShellIntegration::ShortcutLocations(), | 202 ShellIntegration::ShortcutLocations(), |
| 203 web_app::ALLOW_DUPLICATE_SHORTCUTS); | 203 web_app::ALLOW_DUPLICATE_SHORTCUTS); |
| 204 } | 204 } |
| 205 | 205 |
| 206 AppListControllerDelegateCocoa::AppListControllerDelegateCocoa() {} | 206 AppListControllerDelegateCocoa::AppListControllerDelegateCocoa() {} |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 | 465 |
| 466 // static | 466 // static |
| 467 AppListService* AppListService::Get() { | 467 AppListService* AppListService::Get() { |
| 468 return AppListServiceMac::GetInstance(); | 468 return AppListServiceMac::GetInstance(); |
| 469 } | 469 } |
| 470 | 470 |
| 471 // static | 471 // static |
| 472 void AppListService::InitAll(Profile* initial_profile) { | 472 void AppListService::InitAll(Profile* initial_profile) { |
| 473 Get()->Init(initial_profile); | 473 Get()->Init(initial_profile); |
| 474 } | 474 } |
| OLD | NEW |