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

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

Issue 2788563002: Transfer DictionaryValue ownership in SandboxedUnpacker::OnUnpackSuccess() (Closed)
Patch Set: address comments Created 3 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
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | extensions/browser/sandboxed_unpacker.h » ('j') | 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 FROM_HERE, 94 FROM_HERE,
95 base::Bind(&ValidateCrxHelper::StartOnFileThread, 95 base::Bind(&ValidateCrxHelper::StartOnFileThread,
96 this)); 96 this));
97 } 97 }
98 98
99 protected: 99 protected:
100 ~ValidateCrxHelper() override {} 100 ~ValidateCrxHelper() override {}
101 101
102 void OnUnpackSuccess(const base::FilePath& temp_dir, 102 void OnUnpackSuccess(const base::FilePath& temp_dir,
103 const base::FilePath& extension_root, 103 const base::FilePath& extension_root,
104 const base::DictionaryValue* original_manifest, 104 std::unique_ptr<base::DictionaryValue> original_manifest,
105 const Extension* extension, 105 const Extension* extension,
106 const SkBitmap& install_icon) override { 106 const SkBitmap& install_icon) override {
107 finished_ = true; 107 finished_ = true;
108 success_ = true; 108 success_ = true;
109 BrowserThread::PostTask(BrowserThread::UI, 109 BrowserThread::PostTask(BrowserThread::UI,
110 FROM_HERE, 110 FROM_HERE,
111 base::Bind(&ValidateCrxHelper::FinishOnUIThread, 111 base::Bind(&ValidateCrxHelper::FinishOnUIThread,
112 this)); 112 this));
113 } 113 }
114 114
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 *error = base::UTF16ToUTF8(helper->error()); 188 *error = base::UTF16ToUTF8(helper->error());
189 return success; 189 return success;
190 } 190 }
191 191
192 StartupHelper::~StartupHelper() { 192 StartupHelper::~StartupHelper() {
193 if (pack_job_.get()) 193 if (pack_job_.get())
194 pack_job_->ClearClient(); 194 pack_job_->ClearClient();
195 } 195 }
196 196
197 } // namespace extensions 197 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | extensions/browser/sandboxed_unpacker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698