summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension.cc
diff options
context:
space:
mode:
authordzhioev <dzhioev@chromium.org>2014-09-03 05:45:15 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-03 12:46:52 +0000
commitdd6d036ac96067e8613f8c296625d9a049245a32 (patch)
tree91830b48bdb5b1e6a01c457cc84516209c50d3a8 /extensions/common/extension.cc
parent037a83ca04d880a4381192df432c141a398dd668 (diff)
downloadchromium_src-dd6d036ac96067e8613f8c296625d9a049245a32.zip
chromium_src-dd6d036ac96067e8613f8c296625d9a049245a32.tar.gz
chromium_src-dd6d036ac96067e8613f8c296625d9a049245a32.tar.bz2
Revert of Enable forced extension updates on NaCl arch mismatch (patchset #5 id:100001 of https://codereview.chromium.org/516293007/)
Reason for revert: Chrome OS build with DCHECKs enabled fails on start. This CL breaks assumption, that GAIA extension can be loaded without performing IO-operations. Log and stack trace: [16275:16275:0903/161435:WARNING:renderer_freezer.cc(55)] Cgroup freezer does not exist or is not writable. Processes will not be frozen during suspend. [16275:16275:0903/161435:WARNING:configuration_policy_pref_store.cc(30)] Policy RemoteAccessClientFirewallTraversal: This policy has been deprecated. [16275:16275:0903/161437:FATAL:thread_restrictions.cc(38)] Function marked as IO-only was called from a thread that disallows IO! If this thread really should be allowed to make IO calls, adjust the call to base::ThreadRestrictions::SetIOAllowed() in this thread's startup. #0 0x7fe3122e555e base::debug::StackTrace::StackTrace() #1 0x7fe31237c462 logging::LogMessage::~LogMessage() #2 0x7fe3124824af base::ThreadRestrictions::AssertIOAllowed() #3 0x7fe3123630a1 base::PathExists() #4 0x7fe321cfd5f3 extensions::(anonymous namespace)::CollectPlatformSpecificResourceArchs() #5 0x7fe321cfad22 extensions::Extension::InitFromValue() #6 0x7fe321cfa490 extensions::Extension::Create() #7 0x7fe321cfa114 extensions::Extension::Create() #8 0x7fe3233ebe1b extensions::ComponentLoader::Load() #9 0x7fe3233ec3cf extensions::ComponentLoader::Add() #10 0x7fe3233ec32a extensions::ComponentLoader::Add() #11 0x7fe3233ec2b0 extensions::ComponentLoader::Add() #12 0x7fe32437505f (anonymous namespace)::LoadGaiaAuthExtension() #13 0x7fe324374d5e extensions::GaiaAuthExtensionLoader::LoadIfNeeded() #14 0x7fe324237f7e ScopedGaiaAuthExtension::ScopedGaiaAuthExtension() #15 0x7fe322f68bb2 chromeos::WebUILoginView::Init() #16 0x7fe322f556ef chromeos::LoginDisplayHostImpl::InitLoginWindowAndView() #17 0x7fe322f52640 chromeos::LoginDisplayHostImpl::LoadURL() #18 0x7fe322f5226a chromeos::LoginDisplayHostImpl::StartWizard() #19 0x7fe322f54acd chromeos::LoginDisplayHostImpl::StartPostponedWebUI() #20 0x7fe322f541f8 chromeos::LoginDisplayHostImpl::Observe() #21 0x7fe322f54bfd chromeos::LoginDisplayHostImpl::Observe() #22 0x7fe31b222377 content::NotificationServiceImpl::Notify() #23 0x7fe322d51a24 chromeos::(anonymous namespace)::UserWallpaperDelegate::OnWallpaperAnimationFinished() #24 0x7fe31188692f ash::RootWindowController::OnWallpaperAnimationFinished() #25 0x7fe3117c633a ash::(anonymous namespace)::ShowWallpaperAnimationObserver::OnImplicitAnimationsCompleted() #26 0x7fe311f72d30 ui::ImplicitAnimationObserver::CheckCompleted() #27 0x7fe311f72cd5 ui::ImplicitAnimationObserver::SetActive() #28 0x7fe311f965d5 ui::ScopedLayerAnimationSettings::~ScopedLayerAnimationSettings() #29 0x7fe3117c5ec7 ash::DesktopBackgroundWidgetController::StartAnimating() #30 0x7fe3117bbb0c ash::DesktopBackgroundController::InstallDesktopController() #31 0x7fe3117bbc03 ash::DesktopBackgroundController::InstallDesktopControllerForAllWindows() #32 0x7fe3117bb3cc ash::DesktopBackgroundController::SetDesktopBackgroundImageMode() #33 0x7fe3117bb096 ash::DesktopBackgroundController::SetWallpaperImage() #34 0x7fe322f9a6b9 chromeos::WallpaperManager::DoSetDefaultWallpaper() #35 0x7fe322f99b73 chromeos::WallpaperManager::PendingWallpaper::ProcessRequest() #36 0x7fe322fbac72 base::internal::RunnableAdapter<>::Run() #37 0x7fe322fbabe9 base::internal::InvokeHelper<>::MakeItSo() #38 0x7fe322fbaba5 base::internal::Invoker<>::Run() #39 0x7fe3122cc9ce base::Callback<>::Run() #40 0x7fe312488f86 base::Timer::RunScheduledTask() #41 0x7fe3124890bc base::BaseTimerTaskInternal::Run() #42 0x7fe312489382 base::internal::RunnableAdapter<>::Run() #43 0x7fe3124892ec base::internal::InvokeHelper<>::MakeItSo() #44 0x7fe312489295 base::internal::Invoker<>::Run() #45 0x7fe3122cc9ce base::Callback<>::Run() #46 0x7fe3122eb9b3 base::debug::TaskAnnotator::RunTask() #47 0x7fe3123a1c57 base::MessageLoop::RunTask() #48 0x7fe3123a1d9b base::MessageLoop::DeferOrRunPendingTask() #49 0x7fe3123a228d base::MessageLoop::DoDelayedWork() #50 0x7fe3122a1f25 base::MessagePumpGlib::Run() #51 0x7fe3123a17f0 base::MessageLoop::RunHandler() #52 0x7fe3124093b2 base::RunLoop::Run() #53 0x7fe324217e4d ChromeBrowserMainParts::MainMessageLoopRun() #54 0x7fe31ad2a8bf content::BrowserMainLoop::RunMainMessageLoopParts() #55 0x7fe31ad344c7 content::BrowserMainRunnerImpl::Run() #56 0x7fe31ad251b1 content::BrowserMain() #57 0x7fe31abb997f content::RunNamedProcessTypeMain() #58 0x7fe31abbcce8 content::ContentMainRunnerImpl::Run() #59 0x7fe31abb8ee5 content::ContentMain() #60 0x7fe3206d3505 ChromeMain #61 0x7fe3206d34b2 main Cannot upload crash dump: cannot exec /sbin/crash_reporter Crash_reporter failed to process crash report Original issue's description: > Enable forced extension updates on NaCl arch mismatch > > This makes extensions aware of the platforms for which > they have platform-specific resources installed, if any. > > This also hooks up the extension update code with some > additional logic to place an extension in forced-update > mode if it has platform-specific resources which don't > match the current NaCl architecture. > > BUG=409948 > TEST=install an extension which uses NaCl (QuickOffice for example). Rename the _platform-specific/<your-nacl-arch> directory some something else and force an update (e.g. via chrome://extensions button). Observe that a new CRX is downloaded and installed. > > Committed: https://chromium.googlesource.com/chromium/src/+/4a92281fa5d331860d65a59ba45dc882a5c71df4 TBR=sorin@chromium.org,yoz@chromium.org,shuchen@chromium.org,rockot@chromium.org NOTREECHECKS=true NOTRY=true BUG=409948 Review URL: https://codereview.chromium.org/532183003 Cr-Commit-Position: refs/heads/master@{#293128}
Diffstat (limited to 'extensions/common/extension.cc')
-rw-r--r--extensions/common/extension.cc36
1 files changed, 0 insertions, 36 deletions
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index a671cd1..d8e798e 100644
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -4,14 +4,10 @@
#include "extensions/common/extension.h"
-#include <algorithm>
-
#include "base/base64.h"
#include "base/basictypes.h"
#include "base/command_line.h"
-#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
-#include "base/files/file_util.h"
#include "base/i18n/rtl.h"
#include "base/logging.h"
#include "base/memory/singleton.h"
@@ -69,26 +65,6 @@ bool ContainsReservedCharacters(const base::FilePath& path) {
return !net::IsSafePortableRelativePath(path);
}
-void CollectPlatformSpecificResourceArchs(const base::FilePath& extension_path,
- std::set<std::string>* archs) {
- archs->clear();
- base::FilePath platform_specific_path = extension_path.Append(
- kPlatformSpecificFolder);
- if (!base::PathExists(platform_specific_path)) {
- return;
- }
-
- base::FileEnumerator all_archs(platform_specific_path,
- false,
- base::FileEnumerator::DIRECTORIES);
- base::FilePath arch;
- while (!(arch = all_archs.Next()).empty()) {
- std::string arch_name = arch.BaseName().AsUTF8Unsafe();
- std::replace(arch_name.begin(), arch_name.end(), '_', '-');
- archs->insert(arch_name);
- }
-}
-
} // namespace
const int Extension::kInitFromValueFlagBits = 13;
@@ -459,15 +435,6 @@ void Extension::AddWebExtentPattern(const URLPattern& pattern) {
extent_.AddPattern(pattern);
}
-bool Extension::HasPlatformSpecificResources() const {
- return !platform_specific_resource_archs_.empty();
-}
-
-bool Extension::HasResourcesForPlatform(const std::string& arch) const {
- return platform_specific_resource_archs_.find(arch) !=
- platform_specific_resource_archs_.end();
-}
-
// static
bool Extension::InitExtensionID(extensions::Manifest* manifest,
const base::FilePath& path,
@@ -569,9 +536,6 @@ bool Extension::InitFromValue(int flags, base::string16* error) {
permissions_data_.reset(new PermissionsData(this));
- CollectPlatformSpecificResourceArchs(path_,
- &platform_specific_resource_archs_);
-
return true;
}