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

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

Issue 298883006: Rename NOTIFICATION_EXTENSION_INSTALLED to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 6 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
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/apps/ephemeral_app_service.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 "chrome/browser/extensions/extension_install_prompt.h" 7 #include "chrome/browser/extensions/extension_install_prompt.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_util.h" 9 #include "chrome/browser/extensions/extension_util.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 WebstoreStandaloneInstaller::CreateApproval(); 235 WebstoreStandaloneInstaller::CreateApproval();
236 approval->is_ephemeral = true; 236 approval->is_ephemeral = true;
237 return approval.Pass(); 237 return approval.Pass();
238 } 238 }
239 239
240 void EphemeralAppLauncher::CompleteInstall(const std::string& error) { 240 void EphemeralAppLauncher::CompleteInstall(const std::string& error) {
241 if (!error.empty()) 241 if (!error.empty())
242 WebstoreStandaloneInstaller::CompleteInstall(error); 242 WebstoreStandaloneInstaller::CompleteInstall(error);
243 243
244 // If the installation succeeds, we reach this point as a result of 244 // If the installation succeeds, we reach this point as a result of
245 // chrome::NOTIFICATION_EXTENSION_INSTALLED, but this is broadcasted before 245 // chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED, but this is
246 // broadcasted before
246 // ExtensionService has added the extension to its list of installed 247 // ExtensionService has added the extension to its list of installed
247 // extensions and is too early to launch the app. Instead, we will launch at 248 // extensions and is too early to launch the app. Instead, we will launch at
248 // EphemeralAppLauncher::OnExtensionLoaded(). 249 // EphemeralAppLauncher::OnExtensionLoaded().
249 // TODO(tmdiep): Refactor extensions/WebstoreInstaller or 250 // TODO(tmdiep): Refactor extensions/WebstoreInstaller or
250 // WebstoreStandaloneInstaller to support this cleanly. 251 // WebstoreStandaloneInstaller to support this cleanly.
251 } 252 }
252 253
253 void EphemeralAppLauncher::WebContentsDestroyed() { 254 void EphemeralAppLauncher::WebContentsDestroyed() {
254 AbortInstall(); 255 AbortInstall();
255 } 256 }
(...skipping 17 matching lines...) Expand all
273 LaunchApp(extension); 274 LaunchApp(extension);
274 WebstoreStandaloneInstaller::CompleteInstall(std::string()); 275 WebstoreStandaloneInstaller::CompleteInstall(std::string());
275 } else { 276 } else {
276 WebstoreStandaloneInstaller::CompleteInstall(kLaunchAbortedError); 277 WebstoreStandaloneInstaller::CompleteInstall(kLaunchAbortedError);
277 } 278 }
278 } 279 }
279 280
280 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) { 281 void EphemeralAppLauncher::ExtensionEnableFlowAborted(bool user_initiated) {
281 WebstoreStandaloneInstaller::CompleteInstall(kLaunchAbortedError); 282 WebstoreStandaloneInstaller::CompleteInstall(kLaunchAbortedError);
282 } 283 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/apps/ephemeral_app_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698