| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <set> | 5 #include <set> |
| 6 #include <vector> | 6 #include <vector> |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/json/json_string_value_serializer.h" | 8 #include "base/json/json_string_value_serializer.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 282 } |
| 283 | 283 |
| 284 // TODO(felt) Logging should be done more efficiently, so that it | 284 // TODO(felt) Logging should be done more efficiently, so that it |
| 285 // doesn't require construction of the action object. | 285 // doesn't require construction of the action object. |
| 286 scoped_refptr<APIAction> action = new APIAction( | 286 scoped_refptr<APIAction> action = new APIAction( |
| 287 extension_id, | 287 extension_id, |
| 288 base::Time::Now(), | 288 base::Time::Now(), |
| 289 type, | 289 type, |
| 290 api_call, | 290 api_call, |
| 291 MakeArgList(args), | 291 MakeArgList(args), |
| 292 *args, |
| 292 extra); | 293 extra); |
| 293 | 294 |
| 294 observers_->Notify(&Observer::OnExtensionActivity, action); | 295 observers_->Notify(&Observer::OnExtensionActivity, action); |
| 295 if (testing_mode_) LOG(INFO) << action->PrintForDebug(); | 296 if (testing_mode_) LOG(INFO) << action->PrintForDebug(); |
| 296 } else { | 297 } else { |
| 297 LOG(ERROR) << "Unknown API call! " << api_call; | 298 LOG(ERROR) << "Unknown API call! " << api_call; |
| 298 } | 299 } |
| 299 } | 300 } |
| 300 | 301 |
| 301 // A wrapper around LogAPIActionInternal, but we know it's an API call. | 302 // A wrapper around LogAPIActionInternal, but we know it's an API call. |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 web_contents->GetTitle(), | 506 web_contents->GetTitle(), |
| 506 std::string(), // no api call here | 507 std::string(), // no api call here |
| 507 script_names.get(), | 508 script_names.get(), |
| 508 DomActionType::INSERTED, | 509 DomActionType::INSERTED, |
| 509 extra); | 510 extra); |
| 510 } | 511 } |
| 511 } | 512 } |
| 512 } | 513 } |
| 513 | 514 |
| 514 } // namespace extensions | 515 } // namespace extensions |
| OLD | NEW |