| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 if (deal_text.empty()) | 160 if (deal_text.empty()) |
| 161 return NULL; | 161 return NULL; |
| 162 } | 162 } |
| 163 return deal; | 163 return deal; |
| 164 } | 164 } |
| 165 | 165 |
| 166 void NotificationClicked(const std::string& service_path, | 166 void NotificationClicked(const std::string& service_path, |
| 167 const std::string& info_url) { | 167 const std::string& info_url) { |
| 168 if (!info_url.empty()) { | 168 if (!info_url.empty()) { |
| 169 chrome::ScopedTabbedBrowserDisplayer displayer( | 169 chrome::ScopedTabbedBrowserDisplayer displayer( |
| 170 ProfileManager::GetPrimaryUserProfile(), chrome::HOST_DESKTOP_TYPE_ASH); | 170 ProfileManager::GetPrimaryUserProfile()); |
| 171 chrome::ShowSingletonTab(displayer.browser(), GURL(info_url)); | 171 chrome::ShowSingletonTab(displayer.browser(), GURL(info_url)); |
| 172 if (info_url == kDataSaverExtensionUrl) | 172 if (info_url == kDataSaverExtensionUrl) |
| 173 content::RecordAction(base::UserMetricsAction("DataSaverPrompt_Clicked")); | 173 content::RecordAction(base::UserMetricsAction("DataSaverPrompt_Clicked")); |
| 174 } else { | 174 } else { |
| 175 ui::NetworkConnect::Get()->ShowNetworkSettingsForPath(service_path); | 175 ui::NetworkConnect::Get()->ShowNetworkSettingsForPath(service_path); |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace | 179 } // namespace |
| 180 | 180 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 SetDataSaverPromptsShown(0); // demo mode resets times shown counts. | 314 SetDataSaverPromptsShown(0); // demo mode resets times shown counts. |
| 315 SetShow3gPromoNotification(true); | 315 SetShow3gPromoNotification(true); |
| 316 } else { | 316 } else { |
| 317 SetDataSaverPromptsShown(times_shown + 1); | 317 SetDataSaverPromptsShown(times_shown + 1); |
| 318 } | 318 } |
| 319 | 319 |
| 320 return true; | 320 return true; |
| 321 } | 321 } |
| 322 | 322 |
| 323 } // namespace chromeos | 323 } // namespace chromeos |
| OLD | NEW |