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

Side by Side Diff: mojo/service_manager/service_manager.cc

Issue 315863002: Fix destruction tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « no previous file | mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "mojo/service_manager/service_manager.h" 7 #include "mojo/service_manager/service_manager.h"
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return default_loader_.get(); 178 return default_loader_.get();
179 } 179 }
180 180
181 void ServiceManager::OnServiceFactoryError(ServiceFactory* service_factory) { 181 void ServiceManager::OnServiceFactoryError(ServiceFactory* service_factory) {
182 // Called from ~ServiceFactory, so we do not need to call Destroy here. 182 // Called from ~ServiceFactory, so we do not need to call Destroy here.
183 const GURL url = service_factory->url(); 183 const GURL url = service_factory->url();
184 URLToServiceFactoryMap::iterator it = url_to_service_factory_.find(url); 184 URLToServiceFactoryMap::iterator it = url_to_service_factory_.find(url);
185 DCHECK(it != url_to_service_factory_.end()); 185 DCHECK(it != url_to_service_factory_.end());
186 delete it->second; 186 delete it->second;
187 url_to_service_factory_.erase(it); 187 url_to_service_factory_.erase(it);
188 GetLoaderForURL(url)->OnServiceError(this, url); 188 ServiceLoader* loader = GetLoaderForURL(url);
189 if (loader)
190 loader->OnServiceError(this, url);
189 } 191 }
190 192
191 } // namespace mojo 193 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698