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

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

Issue 8530006: chromeos: Add a missing RemoveObserver call in TestingAutomationProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | 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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 BrowserList::AddObserver(this); 195 BrowserList::AddObserver(this);
196 registrar_.Add(this, chrome::NOTIFICATION_SESSION_END, 196 registrar_.Add(this, chrome::NOTIFICATION_SESSION_END,
197 content::NotificationService::AllSources()); 197 content::NotificationService::AllSources());
198 #if defined(OS_CHROMEOS) 198 #if defined(OS_CHROMEOS)
199 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 199 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
200 AddObserver(this); 200 AddObserver(this);
201 #endif 201 #endif
202 } 202 }
203 203
204 TestingAutomationProvider::~TestingAutomationProvider() { 204 TestingAutomationProvider::~TestingAutomationProvider() {
205 #if defined(OS_CHROMEOS)
206 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
207 RemoveObserver(this);
208 #endif
205 BrowserList::RemoveObserver(this); 209 BrowserList::RemoveObserver(this);
206 } 210 }
207 211
208 IPC::Channel::Mode TestingAutomationProvider::GetChannelMode( 212 IPC::Channel::Mode TestingAutomationProvider::GetChannelMode(
209 bool use_named_interface) { 213 bool use_named_interface) {
210 if (use_named_interface) 214 if (use_named_interface)
211 #if defined(OS_POSIX) 215 #if defined(OS_POSIX)
212 return IPC::Channel::MODE_OPEN_NAMED_SERVER; 216 return IPC::Channel::MODE_OPEN_NAMED_SERVER;
213 #else 217 #else
214 return IPC::Channel::MODE_NAMED_SERVER; 218 return IPC::Channel::MODE_NAMED_SERVER;
(...skipping 6169 matching lines...) Expand 10 before | Expand all | Expand 10 after
6384 6388
6385 Send(reply_message_); 6389 Send(reply_message_);
6386 redirect_query_ = 0; 6390 redirect_query_ = 0;
6387 reply_message_ = NULL; 6391 reply_message_ = NULL;
6388 } 6392 }
6389 6393
6390 void TestingAutomationProvider::OnRemoveProvider() { 6394 void TestingAutomationProvider::OnRemoveProvider() {
6391 if (g_browser_process) 6395 if (g_browser_process)
6392 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6396 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6393 } 6397 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698