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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_external_update_validator.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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_external_update_validator.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_external_update_validator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "extensions/common/extension.h" 10 #include "extensions/common/extension.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 content::BrowserThread::PostTask( 45 content::BrowserThread::PostTask(
46 content::BrowserThread::UI, FROM_HERE, 46 content::BrowserThread::UI, FROM_HERE,
47 base::Bind( 47 base::Bind(
48 &KioskExternalUpdateValidatorDelegate::OnExternalUpdateUnpackFailure, 48 &KioskExternalUpdateValidatorDelegate::OnExternalUpdateUnpackFailure,
49 delegate_, crx_file_.extension_id)); 49 delegate_, crx_file_.extension_id));
50 } 50 }
51 51
52 void KioskExternalUpdateValidator::OnUnpackSuccess( 52 void KioskExternalUpdateValidator::OnUnpackSuccess(
53 const base::FilePath& temp_dir, 53 const base::FilePath& temp_dir,
54 const base::FilePath& extension_dir, 54 const base::FilePath& extension_dir,
55 const base::DictionaryValue* original_manifest, 55 std::unique_ptr<base::DictionaryValue> original_manifest,
56 const extensions::Extension* extension, 56 const extensions::Extension* extension,
57 const SkBitmap& install_icon) { 57 const SkBitmap& install_icon) {
58 DCHECK(crx_file_.extension_id == extension->id()); 58 DCHECK(crx_file_.extension_id == extension->id());
59 59
60 std::string minimum_browser_version; 60 std::string minimum_browser_version;
61 if (!extension->manifest()->GetString( 61 if (!extension->manifest()->GetString(
62 extensions::manifest_keys::kMinimumChromeVersion, 62 extensions::manifest_keys::kMinimumChromeVersion,
63 &minimum_browser_version)) { 63 &minimum_browser_version)) {
64 LOG(ERROR) << "Can't find minimum browser version for app " 64 LOG(ERROR) << "Can't find minimum browser version for app "
65 << crx_file_.extension_id; 65 << crx_file_.extension_id;
66 minimum_browser_version.clear(); 66 minimum_browser_version.clear();
67 } 67 }
68 68
69 content::BrowserThread::PostTask( 69 content::BrowserThread::PostTask(
70 content::BrowserThread::UI, FROM_HERE, 70 content::BrowserThread::UI, FROM_HERE,
71 base::Bind( 71 base::Bind(
72 &KioskExternalUpdateValidatorDelegate::OnExtenalUpdateUnpackSuccess, 72 &KioskExternalUpdateValidatorDelegate::OnExtenalUpdateUnpackSuccess,
73 delegate_, crx_file_.extension_id, extension->VersionString(), 73 delegate_, crx_file_.extension_id, extension->VersionString(),
74 minimum_browser_version, temp_dir)); 74 minimum_browser_version, temp_dir));
75 } 75 }
76 76
77 } // namespace chromeos 77 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_external_update_validator.h ('k') | chrome/browser/extensions/crx_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698