Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/safe_browsing/incident_reporting/state_store.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/state_store.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/test/test_simple_task_runner.h" 12 #include "base/test/test_simple_task_runner.h"
13 #include "base/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/prefs/browser_prefs.h" 15 #include "chrome/browser/prefs/browser_prefs.h"
16 #include "chrome/browser/prefs/pref_service_syncable.h"
17 #include "chrome/browser/prefs/pref_service_syncable_factory.h"
18 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" 16 #include "chrome/browser/safe_browsing/incident_reporting/incident.h"
19 #include "chrome/browser/safe_browsing/incident_reporting/platform_state_store.h " 17 #include "chrome/browser/safe_browsing/incident_reporting/platform_state_store.h "
20 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
21 #include "chrome/test/base/testing_browser_process.h" 19 #include "chrome/test/base/testing_browser_process.h"
22 #include "chrome/test/base/testing_profile.h" 20 #include "chrome/test/base/testing_profile.h"
23 #include "chrome/test/base/testing_profile_manager.h" 21 #include "chrome/test/base/testing_profile_manager.h"
24 #include "components/pref_registry/pref_registry_syncable.h" 22 #include "components/pref_registry/pref_registry_syncable.h"
23 #include "components/syncable_prefs/pref_service_syncable.h"
24 #include "components/syncable_prefs/pref_service_syncable_factory.h"
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 #if defined(OS_WIN) 27 #if defined(OS_WIN)
28 #include "base/test/test_reg_util_win.h" 28 #include "base/test/test_reg_util_win.h"
29 #endif 29 #endif
30 30
31 namespace safe_browsing { 31 namespace safe_browsing {
32 32
33 #if defined(OS_WIN) 33 #if defined(OS_WIN)
34 34
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // Verify that the state survived. 267 // Verify that the state survived.
268 ASSERT_TRUE(state_store.HasBeenReported(data.type, data.key, data.digest)); 268 ASSERT_TRUE(state_store.HasBeenReported(data.type, data.key, data.digest));
269 #else 269 #else
270 // Verify that the state did not survive. 270 // Verify that the state did not survive.
271 ASSERT_FALSE(state_store.HasBeenReported(data.type, data.key, data.digest)); 271 ASSERT_FALSE(state_store.HasBeenReported(data.type, data.key, data.digest));
272 #endif 272 #endif
273 } 273 }
274 } 274 }
275 275
276 } // namespace safe_browsing 276 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698