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

Side by Side Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 11411023: Merge 165818 - [Win8] Fix pin / unpin status if the user cancels an action or pins / unpins from st… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src/
Patch Set: Created 8 years, 1 month 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 | « chrome/browser/ui/metro_pin_tab_helper_win.cc ('k') | 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) 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/ui/toolbar/wrench_menu_model.h" 5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 string_id = IDS_EXIT_FULLSCREEN_MAC; 264 string_id = IDS_EXIT_FULLSCREEN_MAC;
265 return l10n_util::GetStringUTF16(string_id); 265 return l10n_util::GetStringUTF16(string_id);
266 } 266 }
267 #elif defined(OS_WIN) 267 #elif defined(OS_WIN)
268 case IDC_PIN_TO_START_SCREEN: { 268 case IDC_PIN_TO_START_SCREEN: {
269 int string_id = IDS_PIN_TO_START_SCREEN; 269 int string_id = IDS_PIN_TO_START_SCREEN;
270 WebContents* web_contents = chrome::GetActiveWebContents(browser_); 270 WebContents* web_contents = chrome::GetActiveWebContents(browser_);
271 MetroPinTabHelper* tab_helper = 271 MetroPinTabHelper* tab_helper =
272 web_contents ? MetroPinTabHelper::FromWebContents(web_contents) 272 web_contents ? MetroPinTabHelper::FromWebContents(web_contents)
273 : NULL; 273 : NULL;
274 if (tab_helper && tab_helper->is_pinned()) 274 if (tab_helper && tab_helper->IsPinned())
275 string_id = IDS_UNPIN_FROM_START_SCREEN; 275 string_id = IDS_UNPIN_FROM_START_SCREEN;
276 return l10n_util::GetStringUTF16(string_id); 276 return l10n_util::GetStringUTF16(string_id);
277 } 277 }
278 #endif 278 #endif
279 case IDC_VIEW_BACKGROUND_PAGES: { 279 case IDC_VIEW_BACKGROUND_PAGES: {
280 string16 num_background_pages = base::FormatNumber( 280 string16 num_background_pages = base::FormatNumber(
281 TaskManager::GetBackgroundPageCount()); 281 TaskManager::GetBackgroundPageCount());
282 return l10n_util::GetStringFUTF16(IDS_VIEW_BACKGROUND_PAGES, 282 return l10n_util::GetStringFUTF16(IDS_VIEW_BACKGROUND_PAGES,
283 num_background_pages); 283 num_background_pages);
284 } 284 }
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 zoom_label_ = l10n_util::GetStringFUTF16( 718 zoom_label_ = l10n_util::GetStringFUTF16(
719 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 719 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
720 } 720 }
721 721
722 string16 WrenchMenuModel::GetSyncMenuLabel() const { 722 string16 WrenchMenuModel::GetSyncMenuLabel() const {
723 Profile* profile = browser_->profile()->GetOriginalProfile(); 723 Profile* profile = browser_->profile()->GetOriginalProfile();
724 return sync_ui_util::GetSyncMenuLabel( 724 return sync_ui_util::GetSyncMenuLabel(
725 ProfileSyncServiceFactory::GetForProfile(profile), 725 ProfileSyncServiceFactory::GetForProfile(profile),
726 *SigninManagerFactory::GetForProfile(profile)); 726 *SigninManagerFactory::GetForProfile(profile));
727 } 727 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/metro_pin_tab_helper_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698