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 "chrome/browser/chromeos/extensions/file_manager/private_api_misc.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_misc.h" |
6 | 6 |
7 #include "apps/app_window.h" | 7 #include "apps/app_window.h" |
8 #include "apps/app_window_registry.h" | 8 #include "apps/app_window_registry.h" |
9 #include "ash/frame/frame_util.h" | 9 #include "ash/frame/frame_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 return false; | 266 return false; |
267 | 267 |
268 const extensions::WebstoreStandaloneInstaller::Callback callback = | 268 const extensions::WebstoreStandaloneInstaller::Callback callback = |
269 base::Bind( | 269 base::Bind( |
270 &FileBrowserPrivateInstallWebstoreItemFunction::OnInstallComplete, | 270 &FileBrowserPrivateInstallWebstoreItemFunction::OnInstallComplete, |
271 this); | 271 this); |
272 | 272 |
273 // Only GoogleCastAPI extension can use silent installation. | 273 // Only GoogleCastAPI extension can use silent installation. |
274 if (params->silent_installation && | 274 if (params->silent_installation && |
275 params->item_id != kGoogleCastApiExtensionId) { | 275 params->item_id != kGoogleCastApiExtensionId) { |
276 SetError("Only whiltelisted items can do silent installation."); | 276 SetError("Only whitelisted items can do silent installation."); |
277 return false; | 277 return false; |
278 } | 278 } |
279 | 279 |
280 scoped_refptr<file_manager::AppInstaller> installer( | 280 scoped_refptr<file_manager::AppInstaller> installer( |
281 new file_manager::AppInstaller(GetAssociatedWebContents(), | 281 new file_manager::AppInstaller(GetAssociatedWebContents(), |
282 params->item_id, | 282 params->item_id, |
283 GetProfile(), | 283 GetProfile(), |
284 params->silent_installation, | 284 params->silent_installation, |
285 callback)); | 285 callback)); |
286 // installer will be AddRef()'d in BeginInstall(). | 286 // installer will be AddRef()'d in BeginInstall(). |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 NOTREACHED(); | 478 NOTREACHED(); |
479 SetError( | 479 SetError( |
480 base::StringPrintf("Unexpected inspection type(%d) is specified.", | 480 base::StringPrintf("Unexpected inspection type(%d) is specified.", |
481 static_cast<int>(params->type))); | 481 static_cast<int>(params->type))); |
482 return false; | 482 return false; |
483 } | 483 } |
484 return true; | 484 return true; |
485 } | 485 } |
486 | 486 |
487 } // namespace extensions | 487 } // namespace extensions |
OLD | NEW |