OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <set> | 7 #include <set> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
303 | 303 |
304 if (!frontend_->extension_prefs()->IsExtensionAllowedByPolicy( | 304 if (!frontend_->extension_prefs()->IsExtensionAllowedByPolicy( |
305 extension_->id())) { | 305 extension_->id())) { |
306 ReportFailureFromUIThread("This extension is blacklisted by admin policy."); | 306 ReportFailureFromUIThread("This extension is blacklisted by admin policy."); |
307 return; | 307 return; |
308 } | 308 } |
309 | 309 |
310 GURL overlapping_url; | 310 GURL overlapping_url; |
311 const Extension* overlapping_extension = | 311 const Extension* overlapping_extension = |
312 frontend_->GetExtensionByOverlappingWebExtent(extension_->web_extent()); | 312 frontend_->GetExtensionByOverlappingWebExtent(extension_->web_extent()); |
313 if (overlapping_extension) { | 313 if (overlapping_extension && |
314 overlapping_extension->id() != extension_->id()) { | |
asargent_no_longer_on_chrome
2011/01/19 17:24:14
Looking at the code before this patch, you'd wonde
| |
314 ReportFailureFromUIThread(l10n_util::GetStringFUTF8( | 315 ReportFailureFromUIThread(l10n_util::GetStringFUTF8( |
315 IDS_EXTENSION_OVERLAPPING_WEB_EXTENT, | 316 IDS_EXTENSION_OVERLAPPING_WEB_EXTENT, |
316 UTF8ToUTF16(overlapping_extension->name()))); | 317 UTF8ToUTF16(overlapping_extension->name()))); |
317 return; | 318 return; |
318 } | 319 } |
319 | 320 |
320 current_version_ = | 321 current_version_ = |
321 frontend_->extension_prefs()->GetVersionString(extension_->id()); | 322 frontend_->extension_prefs()->GetVersionString(extension_->id()); |
322 | 323 |
323 bool whitelisted = ClearWhitelistedInstallId(extension_->id()) && | 324 bool whitelisted = ClearWhitelistedInstallId(extension_->id()) && |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
433 client_->OnInstallSuccess(extension_.get(), install_icon_.get()); | 434 client_->OnInstallSuccess(extension_.get(), install_icon_.get()); |
434 | 435 |
435 // Tell the frontend about the installation and hand off ownership of | 436 // Tell the frontend about the installation and hand off ownership of |
436 // extension_ to it. | 437 // extension_ to it. |
437 frontend_->OnExtensionInstalled(extension_); | 438 frontend_->OnExtensionInstalled(extension_); |
438 extension_ = NULL; | 439 extension_ = NULL; |
439 | 440 |
440 // We're done. We don't post any more tasks to ourselves so we are deleted | 441 // We're done. We don't post any more tasks to ourselves so we are deleted |
441 // soon. | 442 // soon. |
442 } | 443 } |
OLD | NEW |