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

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

Issue 42306: Make startup_tests build and work on Mac. (Closed)
Patch Set: add app dependency Created 11 years, 9 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/automation_provider_list.h" 5 #include "chrome/browser/automation/automation_provider_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/automation/automation_provider.h" 9 #include "chrome/browser/automation/automation_provider.h"
10 10
(...skipping 19 matching lines...) Expand all
30 return true; 30 return true;
31 } 31 }
32 32
33 bool AutomationProviderList::RemoveProvider(AutomationProvider* provider) { 33 bool AutomationProviderList::RemoveProvider(AutomationProvider* provider) {
34 const iterator remove_provider = 34 const iterator remove_provider =
35 find(automation_providers_.begin(), automation_providers_.end(), provider); 35 find(automation_providers_.begin(), automation_providers_.end(), provider);
36 if (remove_provider != automation_providers_.end()) { 36 if (remove_provider != automation_providers_.end()) {
37 (*remove_provider)->Release(); 37 (*remove_provider)->Release();
38 automation_providers_.erase(remove_provider); 38 automation_providers_.erase(remove_provider);
39 g_browser_process->ReleaseModule(); 39 g_browser_process->ReleaseModule();
40 if (automation_providers_.empty())
41 OnLastProviderRemoved();
40 return true; 42 return true;
41 } 43 }
42 return false; 44 return false;
43 } 45 }
44 46
45 AutomationProviderList* AutomationProviderList::GetInstance() { 47 AutomationProviderList* AutomationProviderList::GetInstance() {
46 if (!instance_) { 48 if (!instance_) {
47 instance_ = new AutomationProviderList; 49 instance_ = new AutomationProviderList;
48 } 50 }
49 DCHECK(NULL != instance_); 51 DCHECK(NULL != instance_);
50 return instance_; 52 return instance_;
51 } 53 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_list.h ('k') | chrome/browser/automation/automation_provider_list_generic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698