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

Side by Side Diff: chrome/browser/lifetime/browser_close_manager.cc

Issue 1662783002: Remove HostDesktopType from Browser::CreateParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-12
Patch Set: remove desktop_type_ in bookmark_bubble_sign_in_delegate Created 4 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/lifetime/browser_close_manager.h" 5 #include "chrome/browser/lifetime/browser_close_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 #include "content/public/browser/web_contents.h" 24 #include "content/public/browser/web_contents.h"
25 25
26 namespace { 26 namespace {
27 27
28 // Navigates a browser window for |profile|, creating one if necessary, to the 28 // Navigates a browser window for |profile|, creating one if necessary, to the
29 // downloads page if there are downloads in progress for |profile|. 29 // downloads page if there are downloads in progress for |profile|.
30 void ShowInProgressDownloads(Profile* profile) { 30 void ShowInProgressDownloads(Profile* profile) {
31 DownloadService* download_service = 31 DownloadService* download_service =
32 DownloadServiceFactory::GetForBrowserContext(profile); 32 DownloadServiceFactory::GetForBrowserContext(profile);
33 if (download_service->NonMaliciousDownloadCount() > 0) { 33 if (download_service->NonMaliciousDownloadCount() > 0) {
34 chrome::ScopedTabbedBrowserDisplayer displayer(profile, 34 chrome::ScopedTabbedBrowserDisplayer displayer(profile);
35 chrome::GetActiveDesktop());
36 chrome::ShowDownloads(displayer.browser()); 35 chrome::ShowDownloads(displayer.browser());
37 } 36 }
38 } 37 }
39 38
40 } // namespace 39 } // namespace
41 40
42 BrowserCloseManager::BrowserCloseManager() : current_browser_(nullptr) { 41 BrowserCloseManager::BrowserCloseManager() : current_browser_(nullptr) {
43 } 42 }
44 43
45 BrowserCloseManager::~BrowserCloseManager() { 44 BrowserCloseManager::~BrowserCloseManager() {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 while (browser->tab_strip_model()->count()) 175 while (browser->tab_strip_model()->count())
177 delete browser->tab_strip_model()->GetWebContentsAt(0); 176 delete browser->tab_strip_model()->GetWebContentsAt(0);
178 browser->window()->DestroyBrowser(); 177 browser->window()->DestroyBrowser();
179 // Destroying the browser should have removed it from the browser list. 178 // Destroying the browser should have removed it from the browser list.
180 DCHECK(BrowserList::GetInstance()->end() == 179 DCHECK(BrowserList::GetInstance()->end() ==
181 std::find(BrowserList::GetInstance()->begin(), 180 std::find(BrowserList::GetInstance()->begin(),
182 BrowserList::GetInstance()->end(), browser)); 181 BrowserList::GetInstance()->end(), browser));
183 } 182 }
184 } 183 }
185 } 184 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tab_util.cc ('k') | chrome/browser/lifetime/browser_close_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698