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

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

Issue 10834082: Pass through Extension::FROM_WEBSTORE to Extension::Create when installing an (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove IWYU import fix, could cause cherry-pick problems if we do that Created 8 years, 4 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 (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_inline_installer.h" 5 #include "chrome/browser/extensions/webstore_inline_installer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 manifest_.reset(manifest); 344 manifest_.reset(manifest);
345 icon_ = icon; 345 icon_ = icon;
346 346
347 ExtensionInstallPrompt::Prompt prompt( 347 ExtensionInstallPrompt::Prompt prompt(
348 ExtensionInstallPrompt::INLINE_INSTALL_PROMPT); 348 ExtensionInstallPrompt::INLINE_INSTALL_PROMPT);
349 prompt.SetInlineInstallWebstoreData(localized_user_count_, 349 prompt.SetInlineInstallWebstoreData(localized_user_count_,
350 average_rating_, 350 average_rating_,
351 rating_count_); 351 rating_count_);
352 std::string error; 352 std::string error;
353 dummy_extension_ = ExtensionInstallPrompt::GetLocalizedExtensionForDisplay( 353 dummy_extension_ = ExtensionInstallPrompt::GetLocalizedExtensionForDisplay(
354 manifest, id_, localized_name_, localized_description_, &error); 354 manifest,
355 Extension::FROM_WEBSTORE,
356 id_,
357 localized_name_,
358 localized_description_,
359 &error);
355 if (!dummy_extension_) { 360 if (!dummy_extension_) {
356 OnWebstoreParseFailure(id_, WebstoreInstallHelper::Delegate::MANIFEST_ERROR, 361 OnWebstoreParseFailure(id_, WebstoreInstallHelper::Delegate::MANIFEST_ERROR,
357 kInvalidManifestError); 362 kInvalidManifestError);
358 return; 363 return;
359 } 364 }
360 365
361 install_ui_.reset( 366 install_ui_.reset(
362 ExtensionInstallUI::CreateInstallPromptWithWebContents(web_contents())); 367 ExtensionInstallUI::CreateInstallPromptWithWebContents(web_contents()));
363 install_ui_->ConfirmInlineInstall(this, dummy_extension_, &icon_, prompt); 368 install_ui_->ConfirmInlineInstall(this, dummy_extension_, &icon_, prompt);
364 // Control flow finishes up in InstallUIProceed or InstallUIAbort. 369 // Control flow finishes up in InstallUIProceed or InstallUIAbort.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 DLOG(WARNING) << "Could not parse " << verified_site_url << 455 DLOG(WARNING) << "Could not parse " << verified_site_url <<
451 " as URL pattern " << parse_result; 456 " as URL pattern " << parse_result;
452 return false; 457 return false;
453 } 458 }
454 verified_site_pattern.SetScheme("*"); 459 verified_site_pattern.SetScheme("*");
455 460
456 return verified_site_pattern.MatchesURL(requestor_url); 461 return verified_site_pattern.MatchesURL(requestor_url);
457 } 462 }
458 463
459 } // namespace extensions 464 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698