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

Side by Side Diff: chrome/browser/extensions/crx_installer.cc

Issue 1395043002: Remove ability for users to launch ephemeral apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/crx_installer.h" 5 #include "chrome/browser/extensions/crx_installer.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 expected_manifest_check_level_ = approval->manifest_check_level; 150 expected_manifest_check_level_ = approval->manifest_check_level;
151 if (expected_manifest_check_level_ != 151 if (expected_manifest_check_level_ !=
152 WebstoreInstaller::MANIFEST_CHECK_LEVEL_NONE) 152 WebstoreInstaller::MANIFEST_CHECK_LEVEL_NONE)
153 expected_manifest_.reset(approval->manifest->DeepCopy()); 153 expected_manifest_.reset(approval->manifest->DeepCopy());
154 expected_id_ = approval->extension_id; 154 expected_id_ = approval->extension_id;
155 } 155 }
156 if (approval->minimum_version.get()) 156 if (approval->minimum_version.get())
157 minimum_version_ = base::Version(*approval->minimum_version); 157 minimum_version_ = base::Version(*approval->minimum_version);
158 158
159 show_dialog_callback_ = approval->show_dialog_callback; 159 show_dialog_callback_ = approval->show_dialog_callback;
160 set_is_ephemeral(approval->is_ephemeral);
161 } 160 }
162 161
163 CrxInstaller::~CrxInstaller() { 162 CrxInstaller::~CrxInstaller() {
164 DCHECK_CURRENTLY_ON(BrowserThread::UI); 163 DCHECK_CURRENTLY_ON(BrowserThread::UI);
165 // Ensure |client_| and |install_checker_| data members are destroyed on the 164 // Ensure |client_| and |install_checker_| data members are destroyed on the
166 // UI thread. The |client_| dialog has a weak reference as |this| is its 165 // UI thread. The |client_| dialog has a weak reference as |this| is its
167 // delegate, and |install_checker_| owns WeakPtrs, so must be destroyed on the 166 // delegate, and |install_checker_| owns WeakPtrs, so must be destroyed on the
168 // same thread that created it. 167 // same thread that created it.
169 } 168 }
170 169
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 if (!prefs->DidExtensionEscalatePermissions(extension()->id())) 900 if (!prefs->DidExtensionEscalatePermissions(extension()->id()))
902 return; 901 return;
903 902
904 if (client_) { 903 if (client_) {
905 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort(). 904 AddRef(); // Balanced in InstallUIProceed() and InstallUIAbort().
906 client_->ConfirmReEnable(this, extension()); 905 client_->ConfirmReEnable(this, extension());
907 } 906 }
908 } 907 }
909 908
910 } // namespace extensions 909 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698