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

Side by Side Diff: chrome/browser/download/download_safe_browsing_client_unittest.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "chrome/browser/download/download_safe_browsing_client.h" 6 #include "chrome/browser/download/download_safe_browsing_client.h"
7 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 7 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
8 #include "content/test/test_browser_thread.h" 8 #include "content/test/test_browser_thread.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 using content::BrowserThread;
13
12 namespace { 14 namespace {
13 15
14 const char* kUrl1 = "http://127.0.0.1/"; 16 const char* kUrl1 = "http://127.0.0.1/";
15 const char* kUrl2 = "http://127.0.0.1/two"; 17 const char* kUrl2 = "http://127.0.0.1/two";
16 const char* kUrl3 = "http://127.0.0.1/three"; 18 const char* kUrl3 = "http://127.0.0.1/three";
17 const char* kRefUrl = "http://127.0.0.1/referrer"; 19 const char* kRefUrl = "http://127.0.0.1/referrer";
18 20
19 class MockSafeBrowsingService : public SafeBrowsingService { 21 class MockSafeBrowsingService : public SafeBrowsingService {
20 public: 22 public:
21 MockSafeBrowsingService() {} 23 MockSafeBrowsingService() {}
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 url_chain.push_back(GURL(kUrl1)); 82 url_chain.push_back(GURL(kUrl1));
81 url_chain.push_back(GURL(kUrl2)); 83 url_chain.push_back(GURL(kUrl2));
82 url_chain.push_back(GURL(kUrl3)); 84 url_chain.push_back(GURL(kUrl3));
83 85
84 scoped_refptr<DownloadSBClient> client( 86 scoped_refptr<DownloadSBClient> client(
85 new DownloadSBClient(1, url_chain, GURL(kRefUrl), true)); 87 new DownloadSBClient(1, url_chain, GURL(kRefUrl), true));
86 client->SetSBService(sb_service.get()); 88 client->SetSBService(sb_service.get());
87 89
88 client->ReportMalware(SafeBrowsingService::BINARY_MALWARE_HASH, hash_data); 90 client->ReportMalware(SafeBrowsingService::BINARY_MALWARE_HASH, hash_data);
89 } 91 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_safe_browsing_client.cc ('k') | chrome/browser/download/download_test_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698