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

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

Issue 6515016: Restart named testing channel on disconnect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes per nirnimesh's comments. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/automation/automation_provider.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) 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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 AutomationMsg_WaitForProcessLauncherThreadToGoIdle, 399 AutomationMsg_WaitForProcessLauncherThreadToGoIdle,
400 WaitForProcessLauncherThreadToGoIdle) 400 WaitForProcessLauncherThreadToGoIdle)
401 401
402 IPC_MESSAGE_UNHANDLED( 402 IPC_MESSAGE_UNHANDLED(
403 handled = AutomationProvider::OnMessageReceived(message)) 403 handled = AutomationProvider::OnMessageReceived(message))
404 IPC_END_MESSAGE_MAP() 404 IPC_END_MESSAGE_MAP()
405 return handled; 405 return handled;
406 } 406 }
407 407
408 void TestingAutomationProvider::OnChannelError() { 408 void TestingAutomationProvider::OnChannelError() {
409 if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) 409 if (!reinitialize_on_channel_error_ &&
410 browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID)
410 BrowserList::CloseAllBrowsersAndExit(); 411 BrowserList::CloseAllBrowsersAndExit();
411 AutomationProvider::OnChannelError(); 412 AutomationProvider::OnChannelError();
412 } 413 }
413 414
414 void TestingAutomationProvider::CloseBrowser(int browser_handle, 415 void TestingAutomationProvider::CloseBrowser(int browser_handle,
415 IPC::Message* reply_message) { 416 IPC::Message* reply_message) {
416 if (!browser_tracker_->ContainsHandle(browser_handle)) 417 if (!browser_tracker_->ContainsHandle(browser_handle))
417 return; 418 return;
418 419
419 Browser* browser = browser_tracker_->GetResource(browser_handle); 420 Browser* browser = browser_tracker_->GetResource(browser_handle);
(...skipping 4233 matching lines...) Expand 10 before | Expand all | Expand 10 after
4653 // If you change this, update Observer for NotificationType::SESSION_END 4654 // If you change this, update Observer for NotificationType::SESSION_END
4654 // below. 4655 // below.
4655 MessageLoop::current()->PostTask(FROM_HERE, 4656 MessageLoop::current()->PostTask(FROM_HERE,
4656 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); 4657 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider));
4657 } 4658 }
4658 } 4659 }
4659 4660
4660 void TestingAutomationProvider::OnRemoveProvider() { 4661 void TestingAutomationProvider::OnRemoveProvider() {
4661 AutomationProviderList::GetInstance()->RemoveProvider(this); 4662 AutomationProviderList::GetInstance()->RemoveProvider(this);
4662 } 4663 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698