OLD | NEW |
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 "chrome/browser/extensions/api/log_private/log_private_api.h" | 5 #include "chrome/browser/extensions/api/log_private/log_private_api.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 UnloadedExtensionInfo::Reason reason) { | 167 UnloadedExtensionInfo::Reason reason) { |
168 StopNetInternalsWatch(extension->id()); | 168 StopNetInternalsWatch(extension->id()); |
169 } | 169 } |
170 | 170 |
171 LogPrivateGetHistoricalFunction::LogPrivateGetHistoricalFunction() { | 171 LogPrivateGetHistoricalFunction::LogPrivateGetHistoricalFunction() { |
172 } | 172 } |
173 | 173 |
174 LogPrivateGetHistoricalFunction::~LogPrivateGetHistoricalFunction() { | 174 LogPrivateGetHistoricalFunction::~LogPrivateGetHistoricalFunction() { |
175 } | 175 } |
176 | 176 |
177 bool LogPrivateGetHistoricalFunction::RunImpl() { | 177 bool LogPrivateGetHistoricalFunction::RunAsync() { |
178 // Get parameters | 178 // Get parameters |
179 scoped_ptr<api::log_private::GetHistorical::Params> params( | 179 scoped_ptr<api::log_private::GetHistorical::Params> params( |
180 api::log_private::GetHistorical::Params::Create(*args_)); | 180 api::log_private::GetHistorical::Params::Create(*args_)); |
181 EXTENSION_FUNCTION_VALIDATE(params.get()); | 181 EXTENSION_FUNCTION_VALIDATE(params.get()); |
182 filter_handler_.reset(new FilterHandler(params->filter)); | 182 filter_handler_.reset(new FilterHandler(params->filter)); |
183 | 183 |
184 system_logs::SystemLogsFetcherBase* fetcher; | 184 system_logs::SystemLogsFetcherBase* fetcher; |
185 if ((params->filter).scrub) { | 185 if ((params->filter).scrub) { |
186 fetcher = new system_logs::ScrubbedSystemLogsFetcher(); | 186 fetcher = new system_logs::ScrubbedSystemLogsFetcher(); |
187 } else { | 187 } else { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 LogPrivateStopNetInternalsWatchFunction:: | 228 LogPrivateStopNetInternalsWatchFunction:: |
229 ~LogPrivateStopNetInternalsWatchFunction() { | 229 ~LogPrivateStopNetInternalsWatchFunction() { |
230 } | 230 } |
231 | 231 |
232 bool LogPrivateStopNetInternalsWatchFunction::RunSync() { | 232 bool LogPrivateStopNetInternalsWatchFunction::RunSync() { |
233 LogPrivateAPI::Get(GetProfile())->StopNetInternalsWatch(extension_id()); | 233 LogPrivateAPI::Get(GetProfile())->StopNetInternalsWatch(extension_id()); |
234 return true; | 234 return true; |
235 } | 235 } |
236 | 236 |
237 } // namespace extensions | 237 } // namespace extensions |
OLD | NEW |