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

Unified Diff: win8/metro_driver/toast_notification_handler.cc

Issue 23258005: Give SxS distribution its own registration GUIDs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move typedef Created 7 years, 3 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
Index: win8/metro_driver/toast_notification_handler.cc
diff --git a/win8/metro_driver/toast_notification_handler.cc b/win8/metro_driver/toast_notification_handler.cc
index fb85456287e0ebac8e4a1420b0c21fd9fd1f8f17..ab014d4ff06f22a0fe123a57e7ea8f8b306ede4f 100644
--- a/win8/metro_driver/toast_notification_handler.cc
+++ b/win8/metro_driver/toast_notification_handler.cc
@@ -11,9 +11,10 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
-// TODO(ananta)
-// Refactor the chrome_util and shell_util code from chrome into a common lib
-#include "win8/delegate_execute/chrome_util.h"
+#include "chrome/installer/util/browser_distribution.h"
+#include "chrome/installer/util/install_util.h"
+#include "chrome/installer/util/shell_util.h"
+
#include "win8/metro_driver/winrt_utils.h"
typedef winfoundtn::ITypedEventHandler<
@@ -201,11 +202,13 @@ void ToastNotificationHandler::DisplayNotification(
NOTREACHED() << "Failed to get chrome exe path";
return;
}
- string16 appid = delegate_execute::GetAppId(chrome_path);
+
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ bool is_per_user_install = InstallUtil::IsPerUserInstall(
+ chrome_path.value().c_str());
+ string16 appid = ShellUtil::GetBrowserModelId(dist, is_per_user_install);
DVLOG(1) << "Chrome Appid is " << appid.c_str();
- // TODO(ananta)
- // We should probably use BrowserDistribution here to get the product name.
mswrw::HString app_user_model_id;
app_user_model_id.Attach(MakeHString(appid));

Powered by Google App Engine
This is Rietveld 408576698