| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cros/syslogs_library.h" | 5 #include "chrome/browser/chromeos/cros/syslogs_library.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "chrome/browser/chrome_thread.h" | 10 #include "chrome/browser/chrome_thread.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 NewRunnableMethod( | 75 NewRunnableMethod( |
| 76 this, &SyslogsLibraryImpl::ReadSyslogs, request, compress_logs)); | 76 this, &SyslogsLibraryImpl::ReadSyslogs, request, compress_logs)); |
| 77 | 77 |
| 78 return request->handle(); | 78 return request->handle(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 // Called from FILE thread. | 81 // Called from FILE thread. |
| 82 void SyslogsLibraryImpl::ReadSyslogs( | 82 void SyslogsLibraryImpl::ReadSyslogs( |
| 83 scoped_refptr<CancelableRequest<ReadCompleteCallback> > request, | 83 scoped_refptr<CancelableRequest<ReadCompleteCallback> > request, |
| 84 bool compress_logs) { | 84 bool compress_logs) { |
| 85 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::FILE)); | 85 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 86 | 86 |
| 87 if (request->canceled()) | 87 if (request->canceled()) |
| 88 return; | 88 return; |
| 89 | 89 |
| 90 if (compress_logs && !CommandLine::ForCurrentProcess()->HasSwitch( | 90 if (compress_logs && !CommandLine::ForCurrentProcess()->HasSwitch( |
| 91 switches::kCompressSystemFeedback)) | 91 switches::kCompressSystemFeedback)) |
| 92 compress_logs = false; | 92 compress_logs = false; |
| 93 | 93 |
| 94 // Create temp file. | 94 // Create temp file. |
| 95 FilePath zip_file; | 95 FilePath zip_file; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 125 zip_file.value().c_str(); | 125 zip_file.value().c_str(); |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace chromeos | 129 } // namespace chromeos |
| 130 | 130 |
| 131 // Allows InvokeLater without adding refcounting. SyslogsLibraryImpl is a | 131 // Allows InvokeLater without adding refcounting. SyslogsLibraryImpl is a |
| 132 // Singleton and won't be deleted until it's last InvokeLater is run. | 132 // Singleton and won't be deleted until it's last InvokeLater is run. |
| 133 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::SyslogsLibraryImpl); | 133 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::SyslogsLibraryImpl); |
| 134 | 134 |
| OLD | NEW |