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

Unified Diff: chrome/browser/chromeos/status/data_promo_notification.cc

Issue 10056001: chromeos: Remove old status-area related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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/chromeos/status/data_promo_notification.cc
diff --git a/chrome/browser/chromeos/status/data_promo_notification.cc b/chrome/browser/chromeos/status/data_promo_notification.cc
index 73f556675e10b35d2aec6d12f4827c5416f9186e..553336c2f571fea70150ec3a4eb0476b51d33ec8 100644
--- a/chrome/browser/chromeos/status/data_promo_notification.cc
+++ b/chrome/browser/chromeos/status/data_promo_notification.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/chromeos/login/message_bubble.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/mobile_config.h"
-#include "chrome/browser/chromeos/status/status_area_view_chromeos.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -126,6 +125,11 @@ DataPromoNotification::~DataPromoNotification() {
mobile_data_bubble_->GetWidget()->Close();
}
+void DataPromoNotification::RegisterPrefs(PrefService* local_state) {
+ // Carrier deal notification shown count defaults to 0.
+ local_state->RegisterIntegerPref(prefs::kCarrierDealPromoShown, 0);
+}
+
void DataPromoNotification::ShowOptionalMobileDataPromoNotification(
NetworkLibrary* cros,
views::View* host,
@@ -133,7 +137,7 @@ void DataPromoNotification::ShowOptionalMobileDataPromoNotification(
// Display one-time notification for non-Guest users on first use
// of Mobile Data connection or if there's a carrier deal defined
// show that even if user has already seen generic promo.
- if (StatusAreaViewChromeos::IsBrowserMode() &&
+ if (UserManager::Get()->IsUserLoggedIn() &&
!UserManager::Get()->IsLoggedInAsGuest() &&
check_for_promo_ &&
cros->cellular_connected() && !cros->ethernet_connected() &&
« no previous file with comments | « chrome/browser/chromeos/status/data_promo_notification.h ('k') | chrome/browser/chromeos/status/input_method_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698