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

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

Issue 10388239: Make NetworkProfileBubble not use BrowserList::GetLastActive() as much. Instead pass it a profile a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 if (use_named_interface) 269 if (use_named_interface)
270 #if defined(OS_POSIX) 270 #if defined(OS_POSIX)
271 return IPC::Channel::MODE_OPEN_NAMED_SERVER; 271 return IPC::Channel::MODE_OPEN_NAMED_SERVER;
272 #else 272 #else
273 return IPC::Channel::MODE_NAMED_SERVER; 273 return IPC::Channel::MODE_NAMED_SERVER;
274 #endif 274 #endif
275 else 275 else
276 return IPC::Channel::MODE_CLIENT; 276 return IPC::Channel::MODE_CLIENT;
277 } 277 }
278 278
279 void TestingAutomationProvider::OnBrowserAdded(const Browser* browser) { 279 void TestingAutomationProvider::OnBrowserAdded(Browser* browser) {
280 } 280 }
281 281
282 void TestingAutomationProvider::OnBrowserRemoved(const Browser* browser) { 282 void TestingAutomationProvider::OnBrowserRemoved(Browser* browser) {
283 #if !defined(OS_CHROMEOS) && !defined(OS_MACOSX) 283 #if !defined(OS_CHROMEOS) && !defined(OS_MACOSX)
284 // For backwards compatibility with the testing automation interface, we 284 // For backwards compatibility with the testing automation interface, we
285 // want the automation provider (and hence the process) to go away when the 285 // want the automation provider (and hence the process) to go away when the
286 // last browser goes away. 286 // last browser goes away.
287 if (BrowserList::empty() && !CommandLine::ForCurrentProcess()->HasSwitch( 287 if (BrowserList::empty() && !CommandLine::ForCurrentProcess()->HasSwitch(
288 switches::kKeepAliveForTest)) { 288 switches::kKeepAliveForTest)) {
289 // If you change this, update Observer for chrome::SESSION_END 289 // If you change this, update Observer for chrome::SESSION_END
290 // below. 290 // below.
291 MessageLoop::current()->PostTask( 291 MessageLoop::current()->PostTask(
292 FROM_HERE, 292 FROM_HERE,
(...skipping 6277 matching lines...) Expand 10 before | Expand all | Expand 10 after
6570 6570
6571 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle( 6571 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle(
6572 IPC::Message* reply_message) { 6572 IPC::Message* reply_message) {
6573 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message); 6573 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message);
6574 } 6574 }
6575 6575
6576 void TestingAutomationProvider::OnRemoveProvider() { 6576 void TestingAutomationProvider::OnRemoveProvider() {
6577 if (g_browser_process) 6577 if (g_browser_process)
6578 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6578 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6579 } 6579 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698