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

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

Issue 8745015: Store the "browser autorestarted, last session must be restored" information in a preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix (browser_tests). Created 9 years 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/background/background_mode_manager.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/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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 handled = AutomationProvider::OnMessageReceived(message)) 470 handled = AutomationProvider::OnMessageReceived(message))
471 IPC_END_MESSAGE_MAP_EX() 471 IPC_END_MESSAGE_MAP_EX()
472 if (!deserialize_success) 472 if (!deserialize_success)
473 OnMessageDeserializationFailure(); 473 OnMessageDeserializationFailure();
474 return handled; 474 return handled;
475 } 475 }
476 476
477 void TestingAutomationProvider::OnChannelError() { 477 void TestingAutomationProvider::OnChannelError() {
478 if (!reinitialize_on_channel_error_ && 478 if (!reinitialize_on_channel_error_ &&
479 browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) 479 browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID)
480 BrowserList::AttemptExit(); 480 BrowserList::AttemptExit(false);
481 AutomationProvider::OnChannelError(); 481 AutomationProvider::OnChannelError();
482 } 482 }
483 483
484 void TestingAutomationProvider::CloseBrowser(int browser_handle, 484 void TestingAutomationProvider::CloseBrowser(int browser_handle,
485 IPC::Message* reply_message) { 485 IPC::Message* reply_message) {
486 if (!browser_tracker_->ContainsHandle(browser_handle)) 486 if (!browser_tracker_->ContainsHandle(browser_handle))
487 return; 487 return;
488 488
489 Browser* browser = browser_tracker_->GetResource(browser_handle); 489 Browser* browser = browser_tracker_->GetResource(browser_handle);
490 new BrowserClosedNotificationObserver(browser, this, reply_message); 490 new BrowserClosedNotificationObserver(browser, this, reply_message);
(...skipping 6070 matching lines...) Expand 10 before | Expand all | Expand 10 after
6561 6561
6562 Send(reply_message_); 6562 Send(reply_message_);
6563 redirect_query_ = 0; 6563 redirect_query_ = 0;
6564 reply_message_ = NULL; 6564 reply_message_ = NULL;
6565 } 6565 }
6566 6566
6567 void TestingAutomationProvider::OnRemoveProvider() { 6567 void TestingAutomationProvider::OnRemoveProvider() {
6568 if (g_browser_process) 6568 if (g_browser_process)
6569 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6569 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6570 } 6570 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698