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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 } | 242 } |
243 | 243 |
244 void LogPrivateAPI::AddEntriesOnUI(scoped_ptr<base::ListValue> value) { | 244 void LogPrivateAPI::AddEntriesOnUI(scoped_ptr<base::ListValue> value) { |
245 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 245 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
246 | 246 |
247 for (std::set<std::string>::iterator ix = net_internal_watches_.begin(); | 247 for (std::set<std::string>::iterator ix = net_internal_watches_.begin(); |
248 ix != net_internal_watches_.end(); ++ix) { | 248 ix != net_internal_watches_.end(); ++ix) { |
249 // Create the event's arguments value. | 249 // Create the event's arguments value. |
250 scoped_ptr<base::ListValue> event_args(new base::ListValue()); | 250 scoped_ptr<base::ListValue> event_args(new base::ListValue()); |
251 event_args->Append(value->DeepCopy()); | 251 event_args->Append(value->DeepCopy()); |
252 scoped_ptr<Event> event( | 252 scoped_ptr<Event> event(new Event(::extensions::events::UNKNOWN, |
253 new Event(events::kOnCapturedEvents, event_args.Pass())); | 253 ::events::kOnCapturedEvents, |
| 254 event_args.Pass())); |
254 EventRouter::Get(browser_context_) | 255 EventRouter::Get(browser_context_) |
255 ->DispatchEventToExtension(*ix, event.Pass()); | 256 ->DispatchEventToExtension(*ix, event.Pass()); |
256 } | 257 } |
257 } | 258 } |
258 | 259 |
259 void LogPrivateAPI::CreateTempNetLogFile(const std::string& owner_extension_id, | 260 void LogPrivateAPI::CreateTempNetLogFile(const std::string& owner_extension_id, |
260 base::ScopedFILE* file) { | 261 base::ScopedFILE* file) { |
261 DCHECK(IsRunningOnSequenceThread()); | 262 DCHECK(IsRunningOnSequenceThread()); |
262 | 263 |
263 // Create app-specific subdirectory in session logs folder. | 264 // Create app-specific subdirectory in session logs folder. |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 entry->SetBoolean("isDirectory", false); | 542 entry->SetBoolean("isDirectory", false); |
542 base::ListValue* entry_list = new base::ListValue(); | 543 base::ListValue* entry_list = new base::ListValue(); |
543 entry_list->Append(entry); | 544 entry_list->Append(entry); |
544 response->Set("entries", entry_list); | 545 response->Set("entries", entry_list); |
545 response->SetBoolean("multiple", false); | 546 response->SetBoolean("multiple", false); |
546 SetResult(response.release()); | 547 SetResult(response.release()); |
547 SendResponse(succeeded); | 548 SendResponse(succeeded); |
548 } | 549 } |
549 | 550 |
550 } // namespace extensions | 551 } // namespace extensions |
OLD | NEW |