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

Side by Side Diff: chrome/browser/chromeos/mobile/mobile_activator.cc

Issue 1036723003: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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) 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/chromeos/mobile/mobile_activator.h" 5 #include "chrome/browser/chromeos/mobile/mobile_activator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 std::string CellularConfigDocument::GetErrorMessage(const std::string& code) { 95 std::string CellularConfigDocument::GetErrorMessage(const std::string& code) {
96 base::AutoLock create(config_lock_); 96 base::AutoLock create(config_lock_);
97 ErrorMap::iterator iter = error_map_.find(code); 97 ErrorMap::iterator iter = error_map_.find(code);
98 if (iter == error_map_.end()) 98 if (iter == error_map_.end())
99 return code; 99 return code;
100 return iter->second; 100 return iter->second;
101 } 101 }
102 102
103 void CellularConfigDocument::LoadCellularConfigFile() { 103 void CellularConfigDocument::LoadCellularConfigFile() {
104 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 104 DCHECK_CURRENTLY_ON(BrowserThread::FILE);
105 // Load partner customization startup manifest if it is available. 105 // Load partner customization startup manifest if it is available.
106 base::FilePath config_path(kCellularConfigPath); 106 base::FilePath config_path(kCellularConfigPath);
107 if (!base::PathExists(config_path)) 107 if (!base::PathExists(config_path))
108 return; 108 return;
109 109
110 if (LoadFromFile(config_path)) 110 if (LoadFromFile(config_path))
111 DVLOG(1) << "Cellular config file loaded: " << kCellularConfigPath; 111 DVLOG(1) << "Cellular config file loaded: " << kCellularConfigPath;
112 else 112 else
113 LOG(ERROR) << "Error loading cellular config file: " << kCellularConfigPath; 113 LOG(ERROR) << "Error loading cellular config file: " << kCellularConfigPath;
114 } 114 }
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 cellular_plan_payment_time_ = base::Time::Now(); 1163 cellular_plan_payment_time_ = base::Time::Now();
1164 } 1164 }
1165 1165
1166 bool MobileActivator::HasRecentCellularPlanPayment() const { 1166 bool MobileActivator::HasRecentCellularPlanPayment() const {
1167 const int kRecentPlanPaymentHours = 6; 1167 const int kRecentPlanPaymentHours = 6;
1168 return (base::Time::Now() - 1168 return (base::Time::Now() -
1169 cellular_plan_payment_time_).InHours() < kRecentPlanPaymentHours; 1169 cellular_plan_payment_time_).InHours() < kRecentPlanPaymentHours;
1170 } 1170 }
1171 1171
1172 } // namespace chromeos 1172 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/memory/oom_priority_manager.cc ('k') | chrome/browser/chromeos/mobile_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698