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

Side by Side Diff: components/precache/content/precache_manager_unittest.cc

Issue 818103002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/precache/content/precache_manager.h" 5 #include "components/precache/content/precache_manager.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 public: 136 public:
137 PrecacheManagerTest() 137 PrecacheManagerTest()
138 : precache_manager_(&browser_context_), 138 : precache_manager_(&browser_context_),
139 factory_(NULL, base::Bind(&TestURLFetcherCallback::CreateURLFetcher, 139 factory_(NULL, base::Bind(&TestURLFetcherCallback::CreateURLFetcher,
140 base::Unretained(&url_callback_))) {} 140 base::Unretained(&url_callback_))) {}
141 141
142 protected: 142 protected:
143 void SetUp() override { 143 void SetUp() override {
144 base::StatisticsRecorder::Initialize(); 144 base::StatisticsRecorder::Initialize();
145 145
146 CommandLine::ForCurrentProcess()->AppendSwitchASCII( 146 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
147 switches::kPrecacheConfigSettingsURL, kConfigURL); 147 switches::kPrecacheConfigSettingsURL, kConfigURL);
148 CommandLine::ForCurrentProcess()->AppendSwitchASCII( 148 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
149 switches::kPrecacheManifestURLPrefix, kManifestURLPrefix); 149 switches::kPrecacheManifestURLPrefix, kManifestURLPrefix);
150 150
151 // Make the fetch of the precache configuration settings fail. Precaching 151 // Make the fetch of the precache configuration settings fail. Precaching
152 // should still complete normally in this case. 152 // should still complete normally in this case.
153 factory_.SetFakeResponse(GURL(kConfigURL), "", 153 factory_.SetFakeResponse(GURL(kConfigURL), "",
154 net::HTTP_INTERNAL_SERVER_ERROR, 154 net::HTTP_INTERNAL_SERVER_ERROR,
155 net::URLRequestStatus::FAILED); 155 net::URLRequestStatus::FAILED);
156 } 156 }
157 157
158 content::TestBrowserThreadBundle test_browser_thread_bundle_; 158 content::TestBrowserThreadBundle test_browser_thread_bundle_;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 kCurrentTime, 1000, true); 349 kCurrentTime, 1000, true);
350 expected_histogram_count_map["Precache.Saved"] += 2; 350 expected_histogram_count_map["Precache.Saved"] += 2;
351 351
352 base::MessageLoop::current()->RunUntilIdle(); 352 base::MessageLoop::current()->RunUntilIdle();
353 EXPECT_EQ(expected_histogram_count_map, GetHistogramCountMap()); 353 EXPECT_EQ(expected_histogram_count_map, GetHistogramCountMap());
354 } 354 }
355 355
356 } // namespace 356 } // namespace
357 357
358 } // namespace precache 358 } // namespace precache
OLDNEW
« no previous file with comments | « components/precache/content/precache_manager.cc ('k') | components/precache/core/precache_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698