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

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

Issue 1080453002: Always destroy CrxInstaller on the UI Thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix CrOZ Created 5 years, 8 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/startup_helper.h" 5 #include "chrome/browser/extensions/startup_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return pack_job_succeeded_; 116 return pack_job_succeeded_;
117 } 117 }
118 118
119 namespace { 119 namespace {
120 120
121 class ValidateCrxHelper : public SandboxedUnpackerClient { 121 class ValidateCrxHelper : public SandboxedUnpackerClient {
122 public: 122 public:
123 ValidateCrxHelper(const CRXFileInfo& file, 123 ValidateCrxHelper(const CRXFileInfo& file,
124 const base::FilePath& temp_dir, 124 const base::FilePath& temp_dir,
125 base::RunLoop* run_loop) 125 base::RunLoop* run_loop)
126 : crx_file_(file), 126 : SandboxedUnpackerClient(
127 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)),
128 crx_file_(file),
127 temp_dir_(temp_dir), 129 temp_dir_(temp_dir),
128 run_loop_(run_loop), 130 run_loop_(run_loop),
129 finished_(false), 131 finished_(false),
130 success_(false) {} 132 success_(false) {}
131 133
132 bool finished() { return finished_; } 134 bool finished() { return finished_; }
133 bool success() { return success_; } 135 bool success() { return success_; }
134 const base::string16& error() { return error_; } 136 const base::string16& error() { return error_; }
135 137
136 void Start() { 138 void Start() {
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 LOG(ERROR) << "InstallFromWebstore failed with error: " << helper.error(); 329 LOG(ERROR) << "InstallFromWebstore failed with error: " << helper.error();
328 return helper.success(); 330 return helper.success();
329 } 331 }
330 332
331 StartupHelper::~StartupHelper() { 333 StartupHelper::~StartupHelper() {
332 if (pack_job_.get()) 334 if (pack_job_.get())
333 pack_job_->ClearClient(); 335 pack_job_->ClearClient();
334 } 336 }
335 337
336 } // namespace extensions 338 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698