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

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

Issue 7967008: Revert 101861 - Get rid of content::DidEndMainMessageLoop since it was declared in content but de... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | « no previous file | chrome/browser/chrome_browser_main_gtk.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #include "content/common/notification_service.h" 83 #include "content/common/notification_service.h"
84 #include "ipc/ipc_logging.h" 84 #include "ipc/ipc_logging.h"
85 #include "net/socket/client_socket_pool_manager.h" 85 #include "net/socket/client_socket_pool_manager.h"
86 #include "net/url_request/url_request_context_getter.h" 86 #include "net/url_request/url_request_context_getter.h"
87 #include "ui/base/clipboard/clipboard.h" 87 #include "ui/base/clipboard/clipboard.h"
88 #include "ui/base/l10n/l10n_util.h" 88 #include "ui/base/l10n/l10n_util.h"
89 #include "webkit/plugins/npapi/plugin_list.h" 89 #include "webkit/plugins/npapi/plugin_list.h"
90 90
91 #if defined(OS_WIN) 91 #if defined(OS_WIN)
92 #include "views/focus/view_storage.h" 92 #include "views/focus/view_storage.h"
93 #elif defined(OS_MACOSX)
94 #include "chrome/browser/chrome_browser_main_mac.h"
95 #endif 93 #endif
96 94
97 #if defined(IPC_MESSAGE_LOG_ENABLED) 95 #if defined(IPC_MESSAGE_LOG_ENABLED)
98 #include "content/common/child_process_messages.h" 96 #include "content/common/child_process_messages.h"
99 #endif 97 #endif
100 98
101 #if defined(OS_CHROMEOS) 99 #if defined(OS_CHROMEOS)
102 #include "chrome/browser/chromeos/proxy_config_service_impl.h" 100 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
103 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" 101 #include "chrome/browser/chromeos/web_socket_proxy_controller.h"
104 #endif // defined(OS_CHROMEOS) 102 #endif // defined(OS_CHROMEOS)
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 DCHECK_NE(0u, module_ref_count_); 312 DCHECK_NE(0u, module_ref_count_);
315 module_ref_count_--; 313 module_ref_count_--;
316 if (0 == module_ref_count_) { 314 if (0 == module_ref_count_) {
317 // Allow UI and IO threads to do blocking IO on shutdown, since we do a lot 315 // Allow UI and IO threads to do blocking IO on shutdown, since we do a lot
318 // of it on shutdown for valid reasons. 316 // of it on shutdown for valid reasons.
319 base::ThreadRestrictions::SetIOAllowed(true); 317 base::ThreadRestrictions::SetIOAllowed(true);
320 CHECK(!BrowserList::GetLastActive()); 318 CHECK(!BrowserList::GetLastActive());
321 io_thread()->message_loop()->PostTask( 319 io_thread()->message_loop()->PostTask(
322 FROM_HERE, 320 FROM_HERE,
323 NewRunnableFunction(&base::ThreadRestrictions::SetIOAllowed, true)); 321 NewRunnableFunction(&base::ThreadRestrictions::SetIOAllowed, true));
324
325 #if defined(OS_MACOSX)
326 MessageLoop::current()->PostTask( 322 MessageLoop::current()->PostTask(
327 FROM_HERE, 323 FROM_HERE, NewRunnableFunction(content::DidEndMainMessageLoop));
328 NewRunnableFunction(ChromeBrowserMainPartsMac::DidEndMainMessageLoop));
329 #endif
330 MessageLoop::current()->Quit(); 324 MessageLoop::current()->Quit();
331 } 325 }
332 return module_ref_count_; 326 return module_ref_count_;
333 } 327 }
334 328
335 void BrowserProcessImpl::EndSession() { 329 void BrowserProcessImpl::EndSession() {
336 // Mark all the profiles as clean. 330 // Mark all the profiles as clean.
337 ProfileManager* pm = profile_manager(); 331 ProfileManager* pm = profile_manager();
338 std::vector<Profile*> profiles(pm->GetLoadedProfiles()); 332 std::vector<Profile*> profiles(pm->GetLoadedProfiles());
339 for (size_t i = 0; i < profiles.size(); ++i) 333 for (size_t i = 0; i < profiles.size(); ++i)
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 } 1119 }
1126 1120
1127 void BrowserProcessImpl::OnAutoupdateTimer() { 1121 void BrowserProcessImpl::OnAutoupdateTimer() {
1128 if (CanAutorestartForUpdate()) { 1122 if (CanAutorestartForUpdate()) {
1129 DLOG(WARNING) << "Detected update. Restarting browser."; 1123 DLOG(WARNING) << "Detected update. Restarting browser.";
1130 RestartPersistentInstance(); 1124 RestartPersistentInstance();
1131 } 1125 }
1132 } 1126 }
1133 1127
1134 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1128 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698