| OLD | NEW |
| 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/webstore_installer.h" | 5 #include "chrome/browser/extensions/webstore_installer.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 WebstoreInstaller::Approval::CreateWithNoInstallPrompt( | 220 WebstoreInstaller::Approval::CreateWithNoInstallPrompt( |
| 221 Profile* profile, | 221 Profile* profile, |
| 222 const std::string& extension_id, | 222 const std::string& extension_id, |
| 223 scoped_ptr<base::DictionaryValue> parsed_manifest, | 223 scoped_ptr<base::DictionaryValue> parsed_manifest, |
| 224 bool strict_manifest_check) { | 224 bool strict_manifest_check) { |
| 225 scoped_ptr<Approval> result(new Approval()); | 225 scoped_ptr<Approval> result(new Approval()); |
| 226 result->extension_id = extension_id; | 226 result->extension_id = extension_id; |
| 227 result->profile = profile; | 227 result->profile = profile; |
| 228 result->manifest = scoped_ptr<Manifest>( | 228 result->manifest = scoped_ptr<Manifest>( |
| 229 new Manifest(Manifest::INVALID_LOCATION, | 229 new Manifest(Manifest::INVALID_LOCATION, |
| 230 scoped_ptr<DictionaryValue>(parsed_manifest->DeepCopy()))); | 230 scoped_ptr<base::DictionaryValue>( |
| 231 parsed_manifest->DeepCopy()))); |
| 231 result->skip_install_dialog = true; | 232 result->skip_install_dialog = true; |
| 232 result->manifest_check_level = strict_manifest_check ? | 233 result->manifest_check_level = strict_manifest_check ? |
| 233 MANIFEST_CHECK_LEVEL_STRICT : MANIFEST_CHECK_LEVEL_LOOSE; | 234 MANIFEST_CHECK_LEVEL_STRICT : MANIFEST_CHECK_LEVEL_LOOSE; |
| 234 return result.Pass(); | 235 return result.Pass(); |
| 235 } | 236 } |
| 236 | 237 |
| 237 WebstoreInstaller::Approval::~Approval() {} | 238 WebstoreInstaller::Approval::~Approval() {} |
| 238 | 239 |
| 239 const WebstoreInstaller::Approval* WebstoreInstaller::GetAssociatedApproval( | 240 const WebstoreInstaller::Approval* WebstoreInstaller::GetAssociatedApproval( |
| 240 const DownloadItem& download) { | 241 const DownloadItem& download) { |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 1, | 659 1, |
| 659 kMaxSizeKb, | 660 kMaxSizeKb, |
| 660 kNumBuckets); | 661 kNumBuckets); |
| 661 } | 662 } |
| 662 UMA_HISTOGRAM_BOOLEAN( | 663 UMA_HISTOGRAM_BOOLEAN( |
| 663 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", | 664 "Extensions.WebstoreDownload.InterruptTotalSizeUnknown", |
| 664 total_bytes <= 0); | 665 total_bytes <= 0); |
| 665 } | 666 } |
| 666 | 667 |
| 667 } // namespace extensions | 668 } // namespace extensions |
| OLD | NEW |