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

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

Issue 10885023: Use ChromeBrowserMainPartsAndroid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: thestig's comments Created 8 years, 3 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/browser_process_impl.h ('k') | chrome/browser/chrome_browser_main.h » ('j') | 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 #endif 201 #endif
202 202
203 // Need to clear the desktop notification balloons before the io_thread_ and 203 // Need to clear the desktop notification balloons before the io_thread_ and
204 // before the profiles, since if there are any still showing we will access 204 // before the profiles, since if there are any still showing we will access
205 // those things during teardown. 205 // those things during teardown.
206 notification_ui_manager_.reset(); 206 notification_ui_manager_.reset();
207 207
208 // Need to clear profiles (download managers) before the io_thread_. 208 // Need to clear profiles (download managers) before the io_thread_.
209 profile_manager_.reset(); 209 profile_manager_.reset();
210 210
211 #if !defined(OS_ANDROID)
211 // Debugger must be cleaned up before IO thread and NotificationService. 212 // Debugger must be cleaned up before IO thread and NotificationService.
212 remote_debugging_server_.reset(); 213 remote_debugging_server_.reset();
214 #endif
213 215
214 ExtensionTabIdMap::GetInstance()->Shutdown(); 216 ExtensionTabIdMap::GetInstance()->Shutdown();
215 217
216 // The policy providers managed by |browser_policy_connector_| need to shut 218 // The policy providers managed by |browser_policy_connector_| need to shut
217 // down while the IO and FILE threads are still alive. 219 // down while the IO and FILE threads are still alive.
218 browser_policy_connector_.reset(); 220 browser_policy_connector_.reset();
219 221
220 // Stop the watchdog thread before stopping other threads. 222 // Stop the watchdog thread before stopping other threads.
221 watchdog_thread_.reset(); 223 watchdog_thread_.reset();
222 224
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 return NULL; 472 return NULL;
471 #endif 473 #endif
472 } 474 }
473 475
474 void BrowserProcessImpl::CreateDevToolsHttpProtocolHandler( 476 void BrowserProcessImpl::CreateDevToolsHttpProtocolHandler(
475 Profile* profile, 477 Profile* profile,
476 const std::string& ip, 478 const std::string& ip,
477 int port, 479 int port,
478 const std::string& frontend_url) { 480 const std::string& frontend_url) {
479 DCHECK(CalledOnValidThread()); 481 DCHECK(CalledOnValidThread());
482 #if !defined(OS_ANDROID)
480 // StartupBrowserCreator::LaunchBrowser can be run multiple times when browser 483 // StartupBrowserCreator::LaunchBrowser can be run multiple times when browser
481 // is started with several profiles or existing browser process is reused. 484 // is started with several profiles or existing browser process is reused.
482 if (!remote_debugging_server_.get()) { 485 if (!remote_debugging_server_.get()) {
483 remote_debugging_server_.reset( 486 remote_debugging_server_.reset(
484 new RemoteDebuggingServer(profile, ip, port, frontend_url)); 487 new RemoteDebuggingServer(profile, ip, port, frontend_url));
485 } 488 }
489 #endif
486 } 490 }
487 491
488 bool BrowserProcessImpl::IsShuttingDown() { 492 bool BrowserProcessImpl::IsShuttingDown() {
489 DCHECK(CalledOnValidThread()); 493 DCHECK(CalledOnValidThread());
490 return did_start_ && 0 == module_ref_count_; 494 return did_start_ && 0 == module_ref_count_;
491 } 495 }
492 496
493 printing::PrintJobManager* BrowserProcessImpl::print_job_manager() { 497 printing::PrintJobManager* BrowserProcessImpl::print_job_manager() {
494 // TODO(abarth): DCHECK(CalledOnValidThread()); 498 // TODO(abarth): DCHECK(CalledOnValidThread());
495 // http://code.google.com/p/chromium/issues/detail?id=6828 499 // http://code.google.com/p/chromium/issues/detail?id=6828
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 } 931 }
928 932
929 void BrowserProcessImpl::OnAutoupdateTimer() { 933 void BrowserProcessImpl::OnAutoupdateTimer() {
930 if (CanAutorestartForUpdate()) { 934 if (CanAutorestartForUpdate()) {
931 DLOG(WARNING) << "Detected update. Restarting browser."; 935 DLOG(WARNING) << "Detected update. Restarting browser.";
932 RestartBackgroundInstance(); 936 RestartBackgroundInstance();
933 } 937 }
934 } 938 }
935 939
936 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 940 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/chrome_browser_main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698