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

Side by Side Diff: chrome/browser/apps/ephemeral_app_launcher.cc

Issue 980353003: Extensions: Switch to new permission message system, part I (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup;rebase Created 5 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/apps/ephemeral_app_launcher.h" 5 #include "chrome/browser/apps/ephemeral_app_launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_install_checker.h" 9 #include "chrome/browser/extensions/extension_install_checker.h"
10 #include "chrome/browser/extensions/extension_install_prompt.h" 10 #include "chrome/browser/extensions/extension_install_prompt.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 return web_contents() ? web_contents() : dummy_web_contents_.get(); 386 return web_contents() ? web_contents() : dummy_web_contents_.get();
387 } 387 }
388 388
389 scoped_refptr<ExtensionInstallPrompt::Prompt> 389 scoped_refptr<ExtensionInstallPrompt::Prompt>
390 EphemeralAppLauncher::CreateInstallPrompt() const { 390 EphemeralAppLauncher::CreateInstallPrompt() const {
391 const Extension* extension = localized_extension_for_display(); 391 const Extension* extension = localized_extension_for_display();
392 DCHECK(extension); // Checked in OnManifestParsed(). 392 DCHECK(extension); // Checked in OnManifestParsed().
393 393
394 // Skip the prompt by returning null if the app does not need to display 394 // Skip the prompt by returning null if the app does not need to display
395 // permission warnings. 395 // permission warnings.
396 extensions::PermissionMessages permissions = 396 extensions::CoalescedPermissionMessages permissions =
397 extension->permissions_data()->GetPermissionMessages(); 397 extension->permissions_data()->GetCoalescedPermissionMessages();
398 if (permissions.empty()) 398 if (permissions.empty())
399 return NULL; 399 return NULL;
400 400
401 return make_scoped_refptr(new ExtensionInstallPrompt::Prompt( 401 return make_scoped_refptr(new ExtensionInstallPrompt::Prompt(
402 ExtensionInstallPrompt::LAUNCH_PROMPT)); 402 ExtensionInstallPrompt::LAUNCH_PROMPT));
403 } 403 }
404 404
405 bool EphemeralAppLauncher::CheckInlineInstallPermitted( 405 bool EphemeralAppLauncher::CheckInlineInstallPermitted(
406 const base::DictionaryValue& webstore_data, 406 const base::DictionaryValue& webstore_data,
407 std::string* error) const { 407 std::string* error) const {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 469
470 // CompleteInstall will call Release. 470 // CompleteInstall will call Release.
471 WebstoreStandaloneInstaller::CompleteInstall(webstore_install::SUCCESS, 471 WebstoreStandaloneInstaller::CompleteInstall(webstore_install::SUCCESS,
472 std::string()); 472 std::string());
473 } 473 }
474 474
475 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) { 475 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) {
476 // CompleteInstall will call Release. 476 // CompleteInstall will call Release.
477 CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError); 477 CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError);
478 } 478 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | chrome/browser/extensions/extension_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698