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

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

Issue 16072014: Don't open the 'stats for nerds' in a non-incognito window when incognito is forced. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed getter, left a comment at GetLastUsedProfile Created 7 years, 6 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/profiles/profile_manager_unittest.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/task_manager/task_manager.h" 5 #include "chrome/browser/task_manager/task_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/number_formatting.h" 8 #include "base/i18n/number_formatting.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 model_->ModelChanged(); 1533 model_->ModelChanged();
1534 } 1534 }
1535 1535
1536 // static 1536 // static
1537 TaskManager* TaskManager::GetInstance() { 1537 TaskManager* TaskManager::GetInstance() {
1538 return Singleton<TaskManager>::get(); 1538 return Singleton<TaskManager>::get();
1539 } 1539 }
1540 1540
1541 void TaskManager::OpenAboutMemory(chrome::HostDesktopType desktop_type) { 1541 void TaskManager::OpenAboutMemory(chrome::HostDesktopType desktop_type) {
1542 Browser* browser = chrome::FindOrCreateTabbedBrowser( 1542 Browser* browser = chrome::FindOrCreateTabbedBrowser(
1543 ProfileManager::GetLastUsedProfile(), desktop_type); 1543 ProfileManager::GetLastUsedProfileAllowedByPolicy(), desktop_type);
1544 chrome::NavigateParams params(browser, GURL(chrome::kChromeUIMemoryURL), 1544 chrome::NavigateParams params(browser, GURL(chrome::kChromeUIMemoryURL),
1545 content::PAGE_TRANSITION_LINK); 1545 content::PAGE_TRANSITION_LINK);
1546 params.disposition = NEW_FOREGROUND_TAB; 1546 params.disposition = NEW_FOREGROUND_TAB;
1547 params.window_action = chrome::NavigateParams::SHOW_WINDOW; 1547 params.window_action = chrome::NavigateParams::SHOW_WINDOW;
1548 chrome::Navigate(&params); 1548 chrome::Navigate(&params);
1549 } 1549 }
1550 1550
1551 // static 1551 // static
1552 int TaskManager::GetBackgroundPageCount() { 1552 int TaskManager::GetBackgroundPageCount() {
1553 int count = 0; 1553 int count = 0;
(...skipping 23 matching lines...) Expand all
1577 } 1577 }
1578 return count; 1578 return count;
1579 } 1579 }
1580 1580
1581 TaskManager::TaskManager() 1581 TaskManager::TaskManager()
1582 : model_(new TaskManagerModel(this)) { 1582 : model_(new TaskManagerModel(this)) {
1583 } 1583 }
1584 1584
1585 TaskManager::~TaskManager() { 1585 TaskManager::~TaskManager() {
1586 } 1586 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698