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

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

Issue 10399069: Reland 137540 - Disable off-store extension installs by default. Also get rid of ExtensionService::… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 // Check if the tab has gone away in the meantime. 373 // Check if the tab has gone away in the meantime.
374 if (!web_contents()) { 374 if (!web_contents()) {
375 CompleteInstall(""); 375 CompleteInstall("");
376 return; 376 return;
377 } 377 }
378 378
379 Profile* profile = Profile::FromBrowserContext( 379 Profile* profile = Profile::FromBrowserContext(
380 web_contents()->GetBrowserContext()); 380 web_contents()->GetBrowserContext());
381 381
382 scoped_ptr<WebstoreInstaller::Approval> approval( 382 scoped_ptr<WebstoreInstaller::Approval> approval(
383 new WebstoreInstaller::Approval); 383 WebstoreInstaller::Approval::CreateWithNoInstallPrompt(
384 approval->extension_id = id_; 384 profile,
385 approval->profile = profile; 385 id_,
386 approval->parsed_manifest.reset(manifest_.get()->DeepCopy()); 386 scoped_ptr<base::DictionaryValue>(manifest_.get()->DeepCopy())));
387 approval->use_app_installed_bubble = true; 387 approval->use_app_installed_bubble = true;
388 388
389 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller( 389 scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller(
390 profile, this, &(web_contents()->GetController()), id_, approval.Pass(), 390 profile, this, &(web_contents()->GetController()), id_, approval.Pass(),
391 WebstoreInstaller::FLAG_INLINE_INSTALL); 391 WebstoreInstaller::FLAG_INLINE_INSTALL);
392 installer->Start(); 392 installer->Start();
393 } 393 }
394 394
395 void WebstoreInlineInstaller::InstallUIAbort(bool user_initiated) { 395 void WebstoreInlineInstaller::InstallUIAbort(bool user_initiated) {
396 CompleteInstall(kUserCancelledError); 396 CompleteInstall(kUserCancelledError);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 verified_site_pattern.Parse(verified_site_url); 446 verified_site_pattern.Parse(verified_site_url);
447 if (parse_result != URLPattern::PARSE_SUCCESS) { 447 if (parse_result != URLPattern::PARSE_SUCCESS) {
448 DLOG(WARNING) << "Could not parse " << verified_site_url << 448 DLOG(WARNING) << "Could not parse " << verified_site_url <<
449 " as URL pattern " << parse_result; 449 " as URL pattern " << parse_result;
450 return false; 450 return false;
451 } 451 }
452 verified_site_pattern.SetScheme("*"); 452 verified_site_pattern.SetScheme("*");
453 453
454 return verified_site_pattern.MatchesURL(requestor_url); 454 return verified_site_pattern.MatchesURL(requestor_url);
455 } 455 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_webstore_private_api.cc ('k') | chrome/browser/extensions/webstore_installer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698