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

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10151009: Disallow UI/IO thread blocking on any other thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « base/threading/thread_restrictions.cc ('k') | chrome/browser/io_thread.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) 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 const content::NotificationDetails& details) { 316 const content::NotificationDetails& details) {
317 DCHECK(type == chrome::NOTIFICATION_SESSION_END); 317 DCHECK(type == chrome::NOTIFICATION_SESSION_END);
318 // OnBrowserRemoved does a ReleaseLater. When session end is received we exit 318 // OnBrowserRemoved does a ReleaseLater. When session end is received we exit
319 // before the task runs resulting in this object not being deleted. This 319 // before the task runs resulting in this object not being deleted. This
320 // Release balance out the Release scheduled by OnBrowserRemoved. 320 // Release balance out the Release scheduled by OnBrowserRemoved.
321 Release(); 321 Release();
322 } 322 }
323 323
324 bool TestingAutomationProvider::OnMessageReceived( 324 bool TestingAutomationProvider::OnMessageReceived(
325 const IPC::Message& message) { 325 const IPC::Message& message) {
326 base::ThreadRestrictions::ScopedAllowWait allow_wait;
326 bool handled = true; 327 bool handled = true;
327 bool deserialize_success = true; 328 bool deserialize_success = true;
328 IPC_BEGIN_MESSAGE_MAP_EX(TestingAutomationProvider, 329 IPC_BEGIN_MESSAGE_MAP_EX(TestingAutomationProvider,
329 message, 330 message,
330 deserialize_success) 331 deserialize_success)
331 IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_CloseBrowser, CloseBrowser) 332 IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_CloseBrowser, CloseBrowser)
332 IPC_MESSAGE_HANDLER(AutomationMsg_CloseBrowserRequestAsync, 333 IPC_MESSAGE_HANDLER(AutomationMsg_CloseBrowserRequestAsync,
333 CloseBrowserAsync) 334 CloseBrowserAsync)
334 IPC_MESSAGE_HANDLER(AutomationMsg_ActivateTab, ActivateTab) 335 IPC_MESSAGE_HANDLER(AutomationMsg_ActivateTab, ActivateTab)
335 IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_AppendTab, AppendTab) 336 IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_AppendTab, AppendTab)
(...skipping 6677 matching lines...) Expand 10 before | Expand all | Expand 10 after
7013 *browser_handle = browser_tracker_->Add(browser); 7014 *browser_handle = browser_tracker_->Add(browser);
7014 *success = true; 7015 *success = true;
7015 } 7016 }
7016 } 7017 }
7017 } 7018 }
7018 7019
7019 void TestingAutomationProvider::OnRemoveProvider() { 7020 void TestingAutomationProvider::OnRemoveProvider() {
7020 if (g_browser_process) 7021 if (g_browser_process)
7021 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 7022 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
7022 } 7023 }
OLDNEW
« no previous file with comments | « base/threading/thread_restrictions.cc ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698