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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_app_data.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 | « no previous file | chrome/browser/chromeos/app_mode/kiosk_external_update_validator.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/app_mode/kiosk_app_data.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_data.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 const std::string& required_platform_version() const { 119 const std::string& required_platform_version() const {
120 return required_platform_version_; 120 return required_platform_version_;
121 } 121 }
122 122
123 private: 123 private:
124 ~CrxLoader() override {}; 124 ~CrxLoader() override {};
125 125
126 // extensions::SandboxedUnpackerClient 126 // extensions::SandboxedUnpackerClient
127 void OnUnpackSuccess(const base::FilePath& temp_dir, 127 void OnUnpackSuccess(const base::FilePath& temp_dir,
128 const base::FilePath& extension_root, 128 const base::FilePath& extension_root,
129 const base::DictionaryValue* original_manifest, 129 std::unique_ptr<base::DictionaryValue> original_manifest,
130 const extensions::Extension* extension, 130 const extensions::Extension* extension,
131 const SkBitmap& install_icon) override { 131 const SkBitmap& install_icon) override {
132 DCHECK(task_runner_->RunsTasksOnCurrentThread()); 132 DCHECK(task_runner_->RunsTasksOnCurrentThread());
133 133
134 const extensions::KioskModeInfo* info = 134 const extensions::KioskModeInfo* info =
135 extensions::KioskModeInfo::Get(extension); 135 extensions::KioskModeInfo::Get(extension);
136 if (info == nullptr) { 136 if (info == nullptr) {
137 LOG(ERROR) << extension->id() << " is not a valid kiosk app."; 137 LOG(ERROR) << extension->id() << " is not a valid kiosk app.";
138 success_ = false; 138 success_ = false;
139 } else { 139 } else {
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 720
721 SkBitmap icon = crx_loader->icon(); 721 SkBitmap icon = crx_loader->icon();
722 if (icon.empty()) 722 if (icon.empty())
723 icon = *extensions::util::GetDefaultAppIcon().bitmap(); 723 icon = *extensions::util::GetDefaultAppIcon().bitmap();
724 SetCache(crx_loader->name(), icon, crx_loader->required_platform_version()); 724 SetCache(crx_loader->name(), icon, crx_loader->required_platform_version());
725 725
726 SetStatus(STATUS_LOADED); 726 SetStatus(STATUS_LOADED);
727 } 727 }
728 728
729 } // namespace chromeos 729 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/app_mode/kiosk_external_update_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698