| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/status/data_promo_notification.h" | 5 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
| 6 | 6 |
| 7 #include "ash/system/system_notifier.h" | 7 #include "ash/system/system_notifier.h" |
| 8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 NET_LOG_DEBUG("Carrier Deal Found", deal_text); | 117 NET_LOG_DEBUG("Carrier Deal Found", deal_text); |
| 118 if (deal_text.empty()) | 118 if (deal_text.empty()) |
| 119 return NULL; | 119 return NULL; |
| 120 } | 120 } |
| 121 return deal; | 121 return deal; |
| 122 } | 122 } |
| 123 | 123 |
| 124 void NotificationClicked(const std::string& service_path, | 124 void NotificationClicked(const std::string& service_path, |
| 125 const std::string& info_url) { | 125 const std::string& info_url) { |
| 126 if (info_url.empty()) | 126 if (info_url.empty()) |
| 127 ui::NetworkConnect::Get()->ShowNetworkSettings(service_path); | 127 ui::NetworkConnect::Get()->ShowNetworkSettingsForPath(service_path); |
| 128 | 128 |
| 129 chrome::ScopedTabbedBrowserDisplayer displayer( | 129 chrome::ScopedTabbedBrowserDisplayer displayer( |
| 130 ProfileManager::GetPrimaryUserProfile(), | 130 ProfileManager::GetPrimaryUserProfile(), |
| 131 chrome::HOST_DESKTOP_TYPE_ASH); | 131 chrome::HOST_DESKTOP_TYPE_ASH); |
| 132 chrome::ShowSingletonTab(displayer.browser(), GURL(info_url)); | 132 chrome::ShowSingletonTab(displayer.browser(), GURL(info_url)); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace | 135 } // namespace |
| 136 | 136 |
| 137 //////////////////////////////////////////////////////////////////////////////// | 137 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 ui::NetworkStateNotifier::kNotifierNetwork, | 220 ui::NetworkStateNotifier::kNotifierNetwork, |
| 221 base::Bind(&NotificationClicked, default_network->path(), info_url))); | 221 base::Bind(&NotificationClicked, default_network->path(), info_url))); |
| 222 | 222 |
| 223 check_for_promo_ = false; | 223 check_for_promo_ = false; |
| 224 SetShow3gPromoNotification(false); | 224 SetShow3gPromoNotification(false); |
| 225 if (carrier_deal_promo_pref != kNotificationCountPrefDefault) | 225 if (carrier_deal_promo_pref != kNotificationCountPrefDefault) |
| 226 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1); | 226 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1); |
| 227 } | 227 } |
| 228 | 228 |
| 229 } // namespace chromeos | 229 } // namespace chromeos |
| OLD | NEW |