| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "chrome/browser/extensions/activity_log/activity_action_constants.h" | 10 #include "chrome/browser/extensions/activity_log/activity_action_constants.h" |
| 11 #include "chrome/browser/extensions/activity_log/activity_log.h" | 11 #include "chrome/browser/extensions/activity_log/activity_log.h" |
| 12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
| 13 #include "chrome/browser/extensions/test_extension_system.h" | 13 #include "chrome/browser/extensions/test_extension_system.h" |
| 14 #include "chrome/browser/prerender/prerender_handle.h" | 14 #include "chrome/browser/prerender/prerender_handle.h" |
| 15 #include "chrome/browser/prerender/prerender_manager.h" | 15 #include "chrome/browser/prerender/prerender_manager.h" |
| 16 #include "chrome/browser/prerender/prerender_manager_factory.h" | 16 #include "chrome/browser/prerender/prerender_manager_factory.h" |
| 17 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
| 18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
| 19 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 19 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 20 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
| 21 #include "content/public/test/test_browser_thread_bundle.h" | 21 #include "content/public/test/test_browser_thread_bundle.h" |
| 22 #include "extensions/browser/extension_registry.h" |
| 22 #include "extensions/common/dom_action_types.h" | 23 #include "extensions/common/dom_action_types.h" |
| 23 #include "extensions/common/extension_builder.h" | 24 #include "extensions/common/extension_builder.h" |
| 24 #include "sql/statement.h" | 25 #include "sql/statement.h" |
| 25 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 26 | 27 |
| 27 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
| 28 #include "chrome/browser/chromeos/login/users/user_manager.h" | 29 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 29 #include "chrome/browser/chromeos/settings/cros_settings.h" | 30 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 30 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 31 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 31 #endif | 32 #endif |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 base::Time::Now(), | 361 base::Time::Now(), |
| 361 Action::ACTION_API_CALL, | 362 Action::ACTION_API_CALL, |
| 362 "tabs.testMethod"); | 363 "tabs.testMethod"); |
| 363 activity_log->LogAction(action); | 364 activity_log->LogAction(action); |
| 364 action = new Action(extension->id(), | 365 action = new Action(extension->id(), |
| 365 base::Time::Now(), | 366 base::Time::Now(), |
| 366 Action::ACTION_DOM_ACCESS, | 367 Action::ACTION_DOM_ACCESS, |
| 367 "document.write"); | 368 "document.write"); |
| 368 action->set_page_url(GURL("http://www.google.com")); | 369 action->set_page_url(GURL("http://www.google.com")); |
| 369 | 370 |
| 370 activity_log->OnExtensionUninstalled(extension); | 371 activity_log->OnExtensionUninstalled(NULL, extension); |
| 371 | |
| 372 activity_log->GetFilteredActions( | 372 activity_log->GetFilteredActions( |
| 373 extension->id(), | 373 extension->id(), |
| 374 Action::ACTION_ANY, | 374 Action::ACTION_ANY, |
| 375 "", | 375 "", |
| 376 "", | 376 "", |
| 377 "", | 377 "", |
| 378 -1, | 378 -1, |
| 379 base::Bind(ActivityLogTest::RetrieveActions_LogAndFetchActions0)); | 379 base::Bind(ActivityLogTest::RetrieveActions_LogAndFetchActions0)); |
| 380 } | 380 } |
| 381 | 381 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 401 kExtensionId, | 401 kExtensionId, |
| 402 Action::ACTION_ANY, | 402 Action::ACTION_ANY, |
| 403 "", | 403 "", |
| 404 "", | 404 "", |
| 405 "", | 405 "", |
| 406 -1, | 406 -1, |
| 407 base::Bind(ActivityLogTest::RetrieveActions_ArgUrlApiCalls)); | 407 base::Bind(ActivityLogTest::RetrieveActions_ArgUrlApiCalls)); |
| 408 } | 408 } |
| 409 | 409 |
| 410 } // namespace extensions | 410 } // namespace extensions |
| OLD | NEW |