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

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

Issue 1619433002: Always run the RunLoop in StartupHelper::ValidateCrx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if (!temp_dir.CreateUniqueTempDir()) { 174 if (!temp_dir.CreateUniqueTempDir()) {
175 *error = std::string("Failed to create temp dir"); 175 *error = std::string("Failed to create temp dir");
176 return false; 176 return false;
177 } 177 }
178 178
179 base::RunLoop run_loop; 179 base::RunLoop run_loop;
180 CRXFileInfo file(path); 180 CRXFileInfo file(path);
181 scoped_refptr<ValidateCrxHelper> helper( 181 scoped_refptr<ValidateCrxHelper> helper(
182 new ValidateCrxHelper(file, temp_dir.path(), &run_loop)); 182 new ValidateCrxHelper(file, temp_dir.path(), &run_loop));
183 helper->Start(); 183 helper->Start();
184 if (!helper->finished()) 184 run_loop.Run();
185 run_loop.Run();
186 185
187 bool success = helper->success(); 186 bool success = helper->success();
188 if (!success) 187 if (!success)
189 *error = base::UTF16ToUTF8(helper->error()); 188 *error = base::UTF16ToUTF8(helper->error());
190 return success; 189 return success;
191 } 190 }
192 191
193 StartupHelper::~StartupHelper() { 192 StartupHelper::~StartupHelper() {
194 if (pack_job_.get()) 193 if (pack_job_.get())
195 pack_job_->ClearClient(); 194 pack_job_->ClearClient();
196 } 195 }
197 196
198 } // namespace extensions 197 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698