| 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/activity_log/counting_policy.h" | 5 #include "chrome/browser/extensions/activity_log/counting_policy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 ExtensionBuilder() | 426 ExtensionBuilder() |
| 427 .SetManifest(DictionaryBuilder() | 427 .SetManifest(DictionaryBuilder() |
| 428 .Set("name", "Test extension") | 428 .Set("name", "Test extension") |
| 429 .Set("version", "1.0.0") | 429 .Set("version", "1.0.0") |
| 430 .Set("manifest_version", 2) | 430 .Set("manifest_version", 2) |
| 431 .Build()) | 431 .Build()) |
| 432 .Build(); | 432 .Build(); |
| 433 extension_service_->AddExtension(extension.get()); | 433 extension_service_->AddExtension(extension.get()); |
| 434 | 434 |
| 435 std::unique_ptr<base::ListValue> args(new base::ListValue()); | 435 std::unique_ptr<base::ListValue> args(new base::ListValue()); |
| 436 args->Set(0, new base::StringValue("hello")); | 436 args->Set(0, new base::Value("hello")); |
| 437 args->Set(1, new base::StringValue("world")); | 437 args->Set(1, new base::Value("world")); |
| 438 scoped_refptr<Action> action = new Action(extension->id(), | 438 scoped_refptr<Action> action = new Action(extension->id(), |
| 439 base::Time::Now(), | 439 base::Time::Now(), |
| 440 Action::ACTION_API_CALL, | 440 Action::ACTION_API_CALL, |
| 441 "extension.connect"); | 441 "extension.connect"); |
| 442 action->set_args(std::move(args)); | 442 action->set_args(std::move(args)); |
| 443 | 443 |
| 444 policy->ProcessAction(action); | 444 policy->ProcessAction(action); |
| 445 CheckReadData(policy, | 445 CheckReadData(policy, |
| 446 extension->id(), | 446 extension->id(), |
| 447 0, | 447 0, |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 | 1279 |
| 1280 action_ids.push_back(2); | 1280 action_ids.push_back(2); |
| 1281 CheckRemoveActions( | 1281 CheckRemoveActions( |
| 1282 policy, action_ids, base::Bind(&CountingPolicyTest::Action2Deleted)); | 1282 policy, action_ids, base::Bind(&CountingPolicyTest::Action2Deleted)); |
| 1283 action_ids.clear(); | 1283 action_ids.clear(); |
| 1284 | 1284 |
| 1285 policy->Close(); | 1285 policy->Close(); |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 } // namespace extensions | 1288 } // namespace extensions |
| OLD | NEW |