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

Side by Side Diff: chrome/browser/jumplist.cc

Issue 165422: Merge 22375 - Enable JumpList by default on Windows 7.... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 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 | « chrome/browser/jumplist.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/jumplist.cc:r22375
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/jumplist.h" 5 #include "chrome/browser/jumplist.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shobjidl.h> 8 #include <shobjidl.h>
9 #include <propkey.h> 9 #include <propkey.h>
10 #include <propvarutil.h> 10 #include <propvarutil.h>
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 JumpList::JumpList() : profile_(NULL) { 531 JumpList::JumpList() : profile_(NULL) {
532 } 532 }
533 533
534 JumpList::~JumpList() { 534 JumpList::~JumpList() {
535 RemoveObserver(); 535 RemoveObserver();
536 } 536 }
537 537
538 // static 538 // static
539 bool JumpList::Enabled() { 539 bool JumpList::Enabled() {
540 return (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7 && 540 return (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7 &&
541 CommandLine::ForCurrentProcess()->HasSwitch( 541 !CommandLine::ForCurrentProcess()->HasSwitch(
542 switches::kEnableCustomJumpList)); 542 switches::kDisableCustomJumpList));
543 } 543 }
544 544
545 bool JumpList::AddObserver(Profile* profile) { 545 bool JumpList::AddObserver(Profile* profile) {
546 // To update JumpList when a tab is added or removed, we add this object to 546 // To update JumpList when a tab is added or removed, we add this object to
547 // the observer list of the TabRestoreService class. 547 // the observer list of the TabRestoreService class.
548 // When we add this object to the observer list, we save the pointer to this 548 // When we add this object to the observer list, we save the pointer to this
549 // TabRestoreService object. This pointer is used when we remove this object 549 // TabRestoreService object. This pointer is used when we remove this object
550 // from the observer list. 550 // from the observer list.
551 if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7 || !profile) 551 if (win_util::GetWinVersion() < win_util::WINVERSION_WIN7 || !profile)
552 return false; 552 return false;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 most_visited_pages_, 727 most_visited_pages_,
728 recently_closed_pages_); 728 recently_closed_pages_);
729 MessageLoop* file_loop = g_browser_process->file_thread()->message_loop(); 729 MessageLoop* file_loop = g_browser_process->file_thread()->message_loop();
730 if (file_loop) 730 if (file_loop)
731 file_loop->PostTask(FROM_HERE, icon_task); 731 file_loop->PostTask(FROM_HERE, icon_task);
732 732
733 // Delete all items in these lists since we don't need these lists any longer. 733 // Delete all items in these lists since we don't need these lists any longer.
734 most_visited_pages_.clear(); 734 most_visited_pages_.clear();
735 recently_closed_pages_.clear(); 735 recently_closed_pages_.clear();
736 } 736 }
OLDNEW
« no previous file with comments | « chrome/browser/jumplist.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698