OLD | NEW |
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/system_logs/debug_daemon_log_source.h" | 5 #include "chrome/browser/chromeos/system_logs/debug_daemon_log_source.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 weak_ptr_factory_.GetWeakPtr())); | 73 weak_ptr_factory_.GetWeakPtr())); |
74 } | 74 } |
75 ++num_pending_requests_; | 75 ++num_pending_requests_; |
76 } | 76 } |
77 | 77 |
78 void DebugDaemonLogSource::OnGetRoutes(bool succeeded, | 78 void DebugDaemonLogSource::OnGetRoutes(bool succeeded, |
79 const std::vector<std::string>& routes) { | 79 const std::vector<std::string>& routes) { |
80 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 80 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
81 | 81 |
82 if (succeeded) | 82 if (succeeded) |
83 (*response_)[kRoutesKeyName] = JoinString(routes, '\n'); | 83 (*response_)[kRoutesKeyName] = base::JoinString(routes, "\n"); |
84 else | 84 else |
85 (*response_)[kRoutesKeyName] = kNotAvailable; | 85 (*response_)[kRoutesKeyName] = kNotAvailable; |
86 RequestCompleted(); | 86 RequestCompleted(); |
87 } | 87 } |
88 | 88 |
89 void DebugDaemonLogSource::OnGetNetworkStatus(bool succeeded, | 89 void DebugDaemonLogSource::OnGetNetworkStatus(bool succeeded, |
90 const std::string& status) { | 90 const std::string& status) { |
91 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 91 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
92 | 92 |
93 if (succeeded) | 93 if (succeeded) |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 198 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
199 DCHECK(!callback_.is_null()); | 199 DCHECK(!callback_.is_null()); |
200 | 200 |
201 --num_pending_requests_; | 201 --num_pending_requests_; |
202 if (num_pending_requests_ > 0) | 202 if (num_pending_requests_ > 0) |
203 return; | 203 return; |
204 callback_.Run(response_.get()); | 204 callback_.Run(response_.get()); |
205 } | 205 } |
206 | 206 |
207 } // namespace system_logs | 207 } // namespace system_logs |
OLD | NEW |