| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 21 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
| 22 #include "chrome/test/base/testing_profile.h" | 22 #include "chrome/test/base/testing_profile.h" |
| 23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
| 24 #include "content/public/test/test_browser_thread.h" | 24 #include "content/public/test/test_browser_thread.h" |
| 25 #include "extensions/common/dom_action_types.h" | 25 #include "extensions/common/dom_action_types.h" |
| 26 #include "sql/statement.h" | 26 #include "sql/statement.h" |
| 27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
| 28 | 28 |
| 29 #if defined(OS_CHROMEOS) | 29 #if defined(OS_CHROMEOS) |
| 30 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" | 30 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" |
| 31 #include "chrome/browser/chromeos/login/users/user_manager.h" | 31 #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" |
| 32 #include "chrome/browser/chromeos/settings/cros_settings.h" | 32 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 33 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 33 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 34 #include "chromeos/chromeos_switches.h" | 34 #include "chromeos/chromeos_switches.h" |
| 35 #include "components/user_manager/user_manager.h" |
| 35 #endif | 36 #endif |
| 36 | 37 |
| 37 using content::BrowserThread; | 38 using content::BrowserThread; |
| 38 | 39 |
| 39 namespace constants = activity_log_constants; | 40 namespace constants = activity_log_constants; |
| 40 | 41 |
| 41 namespace extensions { | 42 namespace extensions { |
| 42 | 43 |
| 43 // A dummy implementation of ActivityDatabase::Delegate, sufficient for | 44 // A dummy implementation of ActivityDatabase::Delegate, sufficient for |
| 44 // the unit tests. | 45 // the unit tests. |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 ActivityDatabaseTestPolicy* delegate = new ActivityDatabaseTestPolicy(); | 278 ActivityDatabaseTestPolicy* delegate = new ActivityDatabaseTestPolicy(); |
| 278 ActivityDatabase* activity_db = new ActivityDatabase(delegate); | 279 ActivityDatabase* activity_db = new ActivityDatabase(delegate); |
| 279 scoped_refptr<Action> action = new Action( | 280 scoped_refptr<Action> action = new Action( |
| 280 "punky", base::Time::Now(), Action::ACTION_API_CALL, "brewster"); | 281 "punky", base::Time::Now(), Action::ACTION_API_CALL, "brewster"); |
| 281 action->mutable_args()->AppendString("woof"); | 282 action->mutable_args()->AppendString("woof"); |
| 282 delegate->Record(activity_db, action); | 283 delegate->Record(activity_db, action); |
| 283 activity_db->Close(); | 284 activity_db->Close(); |
| 284 } | 285 } |
| 285 | 286 |
| 286 } // namespace extensions | 287 } // namespace extensions |
| OLD | NEW |