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

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: review 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
« no previous file with comments | « no previous file | chrome/browser/extensions/permission_message_combinations_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 if (extension->permissions_data()->GetPermissionMessageStrings().empty()) 396 if (extension->permissions_data()->GetLegacyPermissionMessageStrings()
397 .empty())
397 return NULL; 398 return NULL;
398 399
399 return make_scoped_refptr(new ExtensionInstallPrompt::Prompt( 400 return make_scoped_refptr(new ExtensionInstallPrompt::Prompt(
400 ExtensionInstallPrompt::LAUNCH_PROMPT)); 401 ExtensionInstallPrompt::LAUNCH_PROMPT));
401 } 402 }
402 403
403 bool EphemeralAppLauncher::CheckInlineInstallPermitted( 404 bool EphemeralAppLauncher::CheckInlineInstallPermitted(
404 const base::DictionaryValue& webstore_data, 405 const base::DictionaryValue& webstore_data,
405 std::string* error) const { 406 std::string* error) const {
406 *error = ""; 407 *error = "";
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 468
468 // CompleteInstall will call Release. 469 // CompleteInstall will call Release.
469 WebstoreStandaloneInstaller::CompleteInstall(webstore_install::SUCCESS, 470 WebstoreStandaloneInstaller::CompleteInstall(webstore_install::SUCCESS,
470 std::string()); 471 std::string());
471 } 472 }
472 473
473 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) { 474 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) {
474 // CompleteInstall will call Release. 475 // CompleteInstall will call Release.
475 CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError); 476 CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError);
476 } 477 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/permission_message_combinations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698