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

Side by Side Diff: src/service_manager.cc

Issue 4746002: cashew: SeviceManager: remove incorrect assert (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cashew.git@master
Patch Set: Created 10 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) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 "src/service_manager.h" 5 #include "src/service_manager.h"
6 6
7 #include <glog/logging.h> 7 #include <glog/logging.h>
8 8
9 #include "src/cashew_server.h" 9 #include "src/cashew_server.h"
10 #include "src/service.h" 10 #include "src/service.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 if (new_default_cellular_service != NULL) { 370 if (new_default_cellular_service != NULL) {
371 SetDefaultCellularService(new_default_cellular_service); 371 SetDefaultCellularService(new_default_cellular_service);
372 } else { 372 } else {
373 ClearDefaultCellularService(); 373 ClearDefaultCellularService();
374 } 374 }
375 } 375 }
376 376
377 void ServiceManager::ClearDefaultCellularService() { 377 void ServiceManager::ClearDefaultCellularService() {
378 DLOG(INFO) << "ClearDefaultCellularService"; 378 DLOG(INFO) << "ClearDefaultCellularService";
379 if (default_cellular_service_ != NULL) { 379 if (default_cellular_service_ != NULL) {
380 DCHECK(GetService(default_cellular_service_->GetPath()) != NULL);
381 DCHECK(default_cellular_service_->IsDefaultService()); 380 DCHECK(default_cellular_service_->IsDefaultService());
382 default_cellular_service_->OnDefaultServiceUpdate(false); 381 default_cellular_service_->OnDefaultServiceUpdate(false);
383 default_cellular_service_ = NULL; 382 default_cellular_service_ = NULL;
384 } 383 }
385 } 384 }
386 385
387 void ServiceManager::SetDefaultCellularService(Service *service) { 386 void ServiceManager::SetDefaultCellularService(Service *service) {
388 DLOG(INFO) << "SetDefaultCellularService: " 387 DLOG(INFO) << "SetDefaultCellularService: "
389 << ((service == NULL) ? "None" : service->GetPath()); 388 << ((service == NULL) ? "None" : service->GetPath());
390 if (default_cellular_service_ == service) { 389 if (default_cellular_service_ == service) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 // notify our child services 431 // notify our child services
433 ServiceMap::iterator it; 432 ServiceMap::iterator it;
434 for (it = services_.begin(); it != services_.end(); ++it) { 433 for (it = services_.begin(); it != services_.end(); ++it) {
435 Service *service = static_cast<Service*>(it->second); 434 Service *service = static_cast<Service*>(it->second);
436 DCHECK(service != NULL); 435 DCHECK(service != NULL);
437 service->OnFlimflamOffline(); 436 service->OnFlimflamOffline();
438 } 437 }
439 } 438 }
440 439
441 } // namespace cashew 440 } // namespace cashew
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