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

Unified Diff: chrome/browser/ui/views/app_list/app_list_controller_win.cc

Issue 14711006: Quick fix to get 7DA counts for unified Chrome / App Launcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing mix-up between InstallationState and InstallationLevel. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/installer/setup/install_worker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/app_list/app_list_controller_win.cc
diff --git a/chrome/browser/ui/views/app_list/app_list_controller_win.cc b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
index 6b22f01c5376f230c45661fd1c0c54b836823f00..519115c3e9c2df1a923ef505afa4d85f0191b808 100644
--- a/chrome/browser/ui/views/app_list/app_list_controller_win.cc
+++ b/chrome/browser/ui/views/app_list/app_list_controller_win.cc
@@ -45,6 +45,7 @@
#include "chrome/installer/launcher_support/chrome_launcher_support.h"
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/google_update_settings.h"
+#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/util_constants.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
@@ -151,16 +152,29 @@ string16 GetAppModelId() {
void SetDidRunForNDayActiveStats() {
DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
-
- chrome_launcher_support::InstallationState launcher_state =
- chrome_launcher_support::GetAppLauncherInstallationState();
- if (launcher_state != chrome_launcher_support::NOT_INSTALLED) {
- BrowserDistribution* dist = BrowserDistribution::GetSpecificDistribution(
- BrowserDistribution::CHROME_APP_HOST);
+ base::FilePath exe_path;
+ if (!PathService::Get(base::DIR_EXE, &exe_path)) {
+ NOTREACHED();
+ return;
+ }
+ bool system_install =
+ !InstallUtil::IsPerUserInstall(exe_path.value().c_str());
+ // Using Chrome Binary dist: Chrome dist may not exist for the legacy
+ // App Launcher, and App Launcher dist may be "shadow", which does not
+ // contain the information needed to determine multi-install.
+ // Edge case involving Canary: crbug/239163.
+ BrowserDistribution* chrome_binaries_dist =
+ BrowserDistribution::GetSpecificDistribution(
+ BrowserDistribution::CHROME_BINARIES);
+ if (chrome_binaries_dist &&
+ InstallUtil::IsMultiInstall(chrome_binaries_dist, system_install)) {
+ BrowserDistribution* app_launcher_dist =
+ BrowserDistribution::GetSpecificDistribution(
+ BrowserDistribution::CHROME_APP_HOST);
GoogleUpdateSettings::UpdateDidRunStateForDistribution(
- dist,
+ app_launcher_dist,
true /* did_run */,
- launcher_state == chrome_launcher_support::INSTALLED_AT_SYSTEM_LEVEL);
+ system_install);
}
}
« no previous file with comments | « no previous file | chrome/installer/setup/install_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698