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

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

Issue 10699057: Move application creation and extension install prompt showing off Browser and onto ExtensionTabHel… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 rating_count_); 352 rating_count_);
353 std::string error; 353 std::string error;
354 dummy_extension_ = ExtensionInstallPrompt::GetLocalizedExtensionForDisplay( 354 dummy_extension_ = ExtensionInstallPrompt::GetLocalizedExtensionForDisplay(
355 manifest, id_, localized_name_, localized_description_, &error); 355 manifest, id_, localized_name_, localized_description_, &error);
356 if (!dummy_extension_) { 356 if (!dummy_extension_) {
357 OnWebstoreParseFailure(id_, WebstoreInstallHelper::Delegate::MANIFEST_ERROR, 357 OnWebstoreParseFailure(id_, WebstoreInstallHelper::Delegate::MANIFEST_ERROR,
358 kInvalidManifestError); 358 kInvalidManifestError);
359 return; 359 return;
360 } 360 }
361 361
362 install_ui_.reset(new ExtensionInstallPrompt(browser)); 362 install_ui_.reset(chrome::CreateExtensionInstallPromptWithBrowser(browser));
363 install_ui_->ConfirmInlineInstall(this, dummy_extension_, &icon_, prompt); 363 install_ui_->ConfirmInlineInstall(this, dummy_extension_, &icon_, prompt);
364 // Control flow finishes up in InstallUIProceed or InstallUIAbort. 364 // Control flow finishes up in InstallUIProceed or InstallUIAbort.
365 } 365 }
366 366
367 void WebstoreInlineInstaller::OnWebstoreParseFailure( 367 void WebstoreInlineInstaller::OnWebstoreParseFailure(
368 const std::string& id, 368 const std::string& id,
369 InstallHelperResultCode result_code, 369 InstallHelperResultCode result_code,
370 const std::string& error_message) { 370 const std::string& error_message) {
371 CompleteInstall(error_message); 371 CompleteInstall(error_message);
372 } 372 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 verified_site_pattern.Parse(verified_site_url); 448 verified_site_pattern.Parse(verified_site_url);
449 if (parse_result != URLPattern::PARSE_SUCCESS) { 449 if (parse_result != URLPattern::PARSE_SUCCESS) {
450 DLOG(WARNING) << "Could not parse " << verified_site_url << 450 DLOG(WARNING) << "Could not parse " << verified_site_url <<
451 " as URL pattern " << parse_result; 451 " as URL pattern " << parse_result;
452 return false; 452 return false;
453 } 453 }
454 verified_site_pattern.SetScheme("*"); 454 verified_site_pattern.SetScheme("*");
455 455
456 return verified_site_pattern.MatchesURL(requestor_url); 456 return verified_site_pattern.MatchesURL(requestor_url);
457 } 457 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/unpacked_installer.cc ('k') | chrome/browser/infobars/infobars_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698