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

Side by Side Diff: chrome/browser/chromeos/status/network_menu_button.cc

Issue 7608023: Show Learn more link in 3G promo bubble only if deal_info_url is not empty (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/network_menu_button.h" 5 #include "chrome/browser/chromeos/status/network_menu_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 // Use deal URL if it's defined or general "Network Settings" URL. 406 // Use deal URL if it's defined or general "Network Settings" URL.
407 int link_message_id; 407 int link_message_id;
408 if (deal_topup_url_.empty()) 408 if (deal_topup_url_.empty())
409 link_message_id = IDS_OFFLINE_NETWORK_SETTINGS; 409 link_message_id = IDS_OFFLINE_NETWORK_SETTINGS;
410 else 410 else
411 link_message_id = IDS_STATUSBAR_NETWORK_VIEW_ACCOUNT; 411 link_message_id = IDS_STATUSBAR_NETWORK_VIEW_ACCOUNT;
412 412
413 std::vector<std::wstring> links; 413 std::vector<std::wstring> links;
414 links.push_back(UTF16ToWide(l10n_util::GetStringUTF16(link_message_id))); 414 links.push_back(UTF16ToWide(l10n_util::GetStringUTF16(link_message_id)));
415 if (!deal_topup_url_.empty()) 415 if (!deal_info_url_.empty())
416 links.push_back(UTF16ToWide(l10n_util::GetStringUTF16(IDS_LEARN_MORE))); 416 links.push_back(UTF16ToWide(l10n_util::GetStringUTF16(IDS_LEARN_MORE)));
417 mobile_data_bubble_ = MessageBubble::ShowWithLinks( 417 mobile_data_bubble_ = MessageBubble::ShowWithLinks(
418 GetWidget(), 418 GetWidget(),
419 button_bounds, 419 button_bounds,
420 BubbleBorder::TOP_RIGHT , 420 BubbleBorder::TOP_RIGHT ,
421 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_NOTIFICATION_3G), 421 ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_NOTIFICATION_3G),
422 notification_text, 422 notification_text,
423 links, 423 links,
424 this); 424 this);
425 425
426 check_for_promo_ = false; 426 check_for_promo_ = false;
427 SetShow3gPromoNotification(false); 427 SetShow3gPromoNotification(false);
428 if (carrier_deal_promo_pref != kNotificationCountPrefDefault) 428 if (carrier_deal_promo_pref != kNotificationCountPrefDefault)
429 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1); 429 SetCarrierDealPromoShown(carrier_deal_promo_pref + 1);
430 } 430 }
431 } 431 }
432 432
433 void NetworkMenuButton::SetTooltipAndAccessibleName(const string16& label) { 433 void NetworkMenuButton::SetTooltipAndAccessibleName(const string16& label) {
434 SetTooltipText(UTF16ToWide(label)); 434 SetTooltipText(UTF16ToWide(label));
435 SetAccessibleName(label); 435 SetAccessibleName(label);
436 } 436 }
437 437
438 } // namespace chromeos 438 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698