| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/extensions/unpacked_installer.h" | 5 #include "chrome/browser/extensions/unpacked_installer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 class SimpleExtensionLoadPrompt : public ExtensionInstallPrompt::Delegate { | 47 class SimpleExtensionLoadPrompt : public ExtensionInstallPrompt::Delegate { |
| 48 public: | 48 public: |
| 49 SimpleExtensionLoadPrompt(const Extension* extension, | 49 SimpleExtensionLoadPrompt(const Extension* extension, |
| 50 Profile* profile, | 50 Profile* profile, |
| 51 const base::Closure& callback); | 51 const base::Closure& callback); |
| 52 virtual ~SimpleExtensionLoadPrompt(); | 52 virtual ~SimpleExtensionLoadPrompt(); |
| 53 | 53 |
| 54 void ShowPrompt(); | 54 void ShowPrompt(); |
| 55 | 55 |
| 56 // ExtensionInstallUI::Delegate | 56 // ExtensionInstallUI::Delegate |
| 57 virtual void InstallUIProceed() OVERRIDE; | 57 virtual void InstallUIProceed() override; |
| 58 virtual void InstallUIAbort(bool user_initiated) OVERRIDE; | 58 virtual void InstallUIAbort(bool user_initiated) override; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 scoped_ptr<ExtensionInstallPrompt> install_ui_; | 61 scoped_ptr<ExtensionInstallPrompt> install_ui_; |
| 62 scoped_refptr<const Extension> extension_; | 62 scoped_refptr<const Extension> extension_; |
| 63 base::Closure callback_; | 63 base::Closure callback_; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 SimpleExtensionLoadPrompt::SimpleExtensionLoadPrompt( | 66 SimpleExtensionLoadPrompt::SimpleExtensionLoadPrompt( |
| 67 const Extension* extension, | 67 const Extension* extension, |
| 68 Profile* profile, | 68 Profile* profile, |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 | 351 |
| 352 PermissionsUpdater perms_updater(service_weak_->profile()); | 352 PermissionsUpdater perms_updater(service_weak_->profile()); |
| 353 perms_updater.InitializePermissions(extension()); | 353 perms_updater.InitializePermissions(extension()); |
| 354 perms_updater.GrantActivePermissions(extension()); | 354 perms_updater.GrantActivePermissions(extension()); |
| 355 | 355 |
| 356 service_weak_->OnExtensionInstalled( | 356 service_weak_->OnExtensionInstalled( |
| 357 extension(), syncer::StringOrdinal(), kInstallFlagInstallImmediately); | 357 extension(), syncer::StringOrdinal(), kInstallFlagInstallImmediately); |
| 358 } | 358 } |
| 359 | 359 |
| 360 } // namespace extensions | 360 } // namespace extensions |
| OLD | NEW |