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

Unified Diff: chrome/browser/notifications/extensions/extension_welcome_notification.cc

Issue 580093003: Factor Google Now welcome notifications out of DesktopNotificationService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: chrome/browser/notifications/extensions/extension_welcome_notification.cc
diff --git a/chrome/browser/notifications/extension_welcome_notification.cc b/chrome/browser/notifications/extensions/extension_welcome_notification.cc
similarity index 96%
rename from chrome/browser/notifications/extension_welcome_notification.cc
rename to chrome/browser/notifications/extensions/extension_welcome_notification.cc
index 84019cef056a3dfabd9538679a94f191c22a03f5..9f6e39df9f0aad6ace06f57debdbecf09a0a53fe 100644
--- a/chrome/browser/notifications/extension_welcome_notification.cc
+++ b/chrome/browser/notifications/extensions/extension_welcome_notification.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/notifications/extension_welcome_notification.h"
+#include "chrome/browser/notifications/extensions/extension_welcome_notification.h"
#include "base/guid.h"
#include "base/lazy_instance.h"
@@ -27,6 +27,8 @@
#include "ui/message_center/notification_types.h"
const int ExtensionWelcomeNotification::kRequestedShowTimeDays = 14;
+const char ExtensionWelcomeNotification::kChromeNowExtensionID[]=
robliao 2014/09/18 20:10:01 Space between [] and =
+ "pafkbggdmjlpgkdkcbjmhmfcdpncadgh";
namespace {
@@ -135,10 +137,10 @@ class DefaultDelegate : public ExtensionWelcomeNotification::Delegate {
} // namespace
ExtensionWelcomeNotification::ExtensionWelcomeNotification(
- const std::string& extension_id,
Profile* const profile,
ExtensionWelcomeNotification::Delegate* const delegate)
- : notifier_id_(message_center::NotifierId::APPLICATION, extension_id),
+ : notifier_id_(message_center::NotifierId::APPLICATION,
+ ExtensionWelcomeNotification::kChromeNowExtensionID),
Jun Mukai 2014/09/18 17:53:48 You can just say kChromeNowExtensionID because it'
Peter Beverloo 2014/09/19 13:01:22 I removed the prefix, but since still end up with
profile_(profile),
delegate_(delegate) {
welcome_notification_dismissed_pref_.Init(
@@ -154,18 +156,15 @@ ExtensionWelcomeNotification::ExtensionWelcomeNotification(
// static
scoped_ptr<ExtensionWelcomeNotification> ExtensionWelcomeNotification::Create(
- const std::string& extension_id,
Profile* const profile) {
- return Create(extension_id, profile, new DefaultDelegate()).Pass();
+ return Create(profile, new DefaultDelegate()).Pass();
}
// static
scoped_ptr<ExtensionWelcomeNotification> ExtensionWelcomeNotification::Create(
- const std::string& extension_id,
- Profile* const profile,
- Delegate* const delegate) {
+ Profile* const profile, Delegate* const delegate) {
return scoped_ptr<ExtensionWelcomeNotification>(
- new ExtensionWelcomeNotification(extension_id, profile, delegate)).Pass();
+ new ExtensionWelcomeNotification(profile, delegate)).Pass();
}
ExtensionWelcomeNotification::~ExtensionWelcomeNotification() {

Powered by Google App Engine
This is Rietveld 408576698