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

Unified Diff: chrome/browser/local_discovery/privet_url_fetcher_unittest.cc

Issue 166373006: Use persistent map of privet tokens for PrivetURLFetcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/local_discovery/privet_url_fetcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/local_discovery/privet_url_fetcher_unittest.cc
diff --git a/chrome/browser/local_discovery/privet_url_fetcher_unittest.cc b/chrome/browser/local_discovery/privet_url_fetcher_unittest.cc
index a6eaea4b2376fd8b14f3fa8b41b7719541cae55e..2737755a00d810fc9bd92f487e08c73c00dd90bc 100644
--- a/chrome/browser/local_discovery/privet_url_fetcher_unittest.cc
+++ b/chrome/browser/local_discovery/privet_url_fetcher_unittest.cc
@@ -89,11 +89,13 @@ class PrivetURLFetcherTest : public ::testing::Test {
request_context_= new net::TestURLRequestContextGetter(
base::MessageLoopProxy::current());
privet_urlfetcher_.reset(new PrivetURLFetcher(
- kSamplePrivetToken,
GURL(kSamplePrivetURL),
net::URLFetcher::POST,
request_context_.get(),
&delegate_));
+
+ PrivetURLFetcher::SetTokenForHost(GURL(kSamplePrivetURL).GetOrigin().spec(),
+ kSamplePrivetToken);
}
virtual ~PrivetURLFetcherTest() {
}
@@ -204,12 +206,8 @@ TEST_F(PrivetURLFetcherTest, Header) {
}
TEST_F(PrivetURLFetcherTest, Header2) {
- privet_urlfetcher_.reset(new PrivetURLFetcher(
- "",
- GURL(kSamplePrivetURL),
- net::URLFetcher::POST,
- request_context_.get(),
- &delegate_));
+ PrivetURLFetcher::SetTokenForHost(GURL(kSamplePrivetURL).GetOrigin().spec(),
+ "");
privet_urlfetcher_->AllowEmptyPrivetToken();
privet_urlfetcher_->Start();
« no previous file with comments | « chrome/browser/local_discovery/privet_url_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698