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

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

Issue 833033002: Remove dependency on //content from history DownloadDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests and move download_database.{cc,h} Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/last_download_finder.h " 5 #include "chrome/browser/safe_browsing/incident_reporting/last_download_finder.h "
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "chrome/browser/history/chrome_history_client.h" 16 #include "chrome/browser/history/chrome_history_client.h"
17 #include "chrome/browser/history/chrome_history_client_factory.h" 17 #include "chrome/browser/history/chrome_history_client_factory.h"
18 #include "chrome/browser/history/download_row.h"
19 #include "chrome/browser/history/history_service.h" 18 #include "chrome/browser/history/history_service.h"
20 #include "chrome/browser/history/history_service_factory.h" 19 #include "chrome/browser/history/history_service_factory.h"
21 #include "chrome/browser/history/web_history_service_factory.h" 20 #include "chrome/browser/history/web_history_service_factory.h"
22 #include "chrome/browser/prefs/browser_prefs.h" 21 #include "chrome/browser/prefs/browser_prefs.h"
23 #include "chrome/browser/profiles/profile_manager.h" 22 #include "chrome/browser/profiles/profile_manager.h"
24 #include "chrome/common/chrome_constants.h" 23 #include "chrome/common/chrome_constants.h"
25 #include "chrome/common/pref_names.h" 24 #include "chrome/common/pref_names.h"
26 #include "chrome/common/safe_browsing/csd.pb.h" 25 #include "chrome/common/safe_browsing/csd.pb.h"
27 #include "chrome/test/base/testing_browser_process.h" 26 #include "chrome/test/base/testing_browser_process.h"
28 #include "chrome/test/base/testing_pref_service_syncable.h" 27 #include "chrome/test/base/testing_pref_service_syncable.h"
29 #include "chrome/test/base/testing_profile.h" 28 #include "chrome/test/base/testing_profile.h"
30 #include "chrome/test/base/testing_profile_manager.h" 29 #include "chrome/test/base/testing_profile_manager.h"
30 #include "components/history/core/browser/download_row.h"
31 #include "components/history/core/browser/history_constants.h" 31 #include "components/history/core/browser/history_constants.h"
32 #include "content/public/test/test_browser_thread_bundle.h" 32 #include "content/public/test/test_browser_thread_bundle.h"
33 #include "content/public/test/test_utils.h" 33 #include "content/public/test/test_utils.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 35
36 namespace { 36 namespace {
37 37
38 // A BrowserContextKeyedServiceFactory::TestingFactoryFunction that creates a 38 // A BrowserContextKeyedServiceFactory::TestingFactoryFunction that creates a
39 // HistoryService for a TestingProfile. 39 // HistoryService for a TestingProfile.
40 KeyedService* BuildHistoryService(content::BrowserContext* context) { 40 KeyedService* BuildHistoryService(content::BrowserContext* context) {
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 base::Unretained(this), 334 base::Unretained(this),
335 &last_download, 335 &last_download,
336 run_loop.QuitClosure()))); 336 run_loop.QuitClosure())));
337 337
338 run_loop.Run(); 338 run_loop.Run();
339 339
340 ExpectFoundTestDownload(last_download.Pass()); 340 ExpectFoundTestDownload(last_download.Pass());
341 } 341 }
342 342
343 } // namespace safe_browsing 343 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698