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

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

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 } // namespace 92 } // namespace
93 93
94 // static 94 // static
95 bool EphemeralAppLauncher::IsFeatureEnabled() { 95 bool EphemeralAppLauncher::IsFeatureEnabled() {
96 return app_list::switches::IsExperimentalAppListEnabled(); 96 return app_list::switches::IsExperimentalAppListEnabled();
97 } 97 }
98 98
99 // static 99 // static
100 bool EphemeralAppLauncher::IsFeatureEnabledInWebstore() { 100 bool EphemeralAppLauncher::IsFeatureEnabledInWebstore() {
101 return IsFeatureEnabled() && CommandLine::ForCurrentProcess()->HasSwitch( 101 return IsFeatureEnabled() &&
102 switches::kEnableEphemeralAppsInWebstore); 102 base::CommandLine::ForCurrentProcess()->HasSwitch(
103 switches::kEnableEphemeralAppsInWebstore);
103 } 104 }
104 105
105 // static 106 // static
106 scoped_refptr<EphemeralAppLauncher> EphemeralAppLauncher::CreateForLauncher( 107 scoped_refptr<EphemeralAppLauncher> EphemeralAppLauncher::CreateForLauncher(
107 const std::string& webstore_item_id, 108 const std::string& webstore_item_id,
108 Profile* profile, 109 Profile* profile,
109 gfx::NativeWindow parent_window, 110 gfx::NativeWindow parent_window,
110 const LaunchCallback& callback) { 111 const LaunchCallback& callback) {
111 scoped_refptr<EphemeralAppLauncher> installer = 112 scoped_refptr<EphemeralAppLauncher> installer =
112 new EphemeralAppLauncher(webstore_item_id, 113 new EphemeralAppLauncher(webstore_item_id,
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 475
475 // CompleteInstall will call Release. 476 // CompleteInstall will call Release.
476 WebstoreStandaloneInstaller::CompleteInstall(webstore_install::SUCCESS, 477 WebstoreStandaloneInstaller::CompleteInstall(webstore_install::SUCCESS,
477 std::string()); 478 std::string());
478 } 479 }
479 480
480 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) { 481 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) {
481 // CompleteInstall will call Release. 482 // CompleteInstall will call Release.
482 CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError); 483 CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError);
483 } 484 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_url_redirector_browsertest.cc ('k') | chrome/browser/apps/ephemeral_app_launcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698