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

Side by Side Diff: chrome/browser/net/http_server_properties_manager_unittest.cc

Issue 375083002: Break out the IO thread aspects of HttpServerPropertiesManager into a new ChromeHttpServerPropertie… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/net/http_server_properties_manager.h" 5 #include "chrome/browser/net/http_server_properties_manager.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/testing_pref_service.h" 10 #include "base/prefs/testing_pref_service.h"
(...skipping 19 matching lines...) Expand all
30 explicit TestingHttpServerPropertiesManager(PrefService* pref_service) 30 explicit TestingHttpServerPropertiesManager(PrefService* pref_service)
31 : HttpServerPropertiesManager(pref_service) { 31 : HttpServerPropertiesManager(pref_service) {
32 InitializeOnIOThread(); 32 InitializeOnIOThread();
33 } 33 }
34 34
35 virtual ~TestingHttpServerPropertiesManager() { 35 virtual ~TestingHttpServerPropertiesManager() {
36 } 36 }
37 37
38 // Make these methods public for testing. 38 // Make these methods public for testing.
39 using HttpServerPropertiesManager::ScheduleUpdateCacheOnUI; 39 using HttpServerPropertiesManager::ScheduleUpdateCacheOnUI;
40 using HttpServerPropertiesManager::ScheduleUpdatePrefsOnIO; 40 //using HttpServerPropertiesManager::ScheduleUpdatePrefsOnIO;
41 41
42 /*
42 // Post tasks without a delay during tests. 43 // Post tasks without a delay during tests.
43 virtual void StartPrefsUpdateTimerOnIO(base::TimeDelta delay) OVERRIDE { 44 virtual void StartPrefsUpdateTimerOnIO(base::TimeDelta delay) OVERRIDE {
44 HttpServerPropertiesManager::StartPrefsUpdateTimerOnIO( 45 HttpServerPropertiesManager::StartPrefsUpdateTimerOnIO(
45 base::TimeDelta()); 46 base::TimeDelta());
46 } 47 }
48 */
47 49
48 void UpdateCacheFromPrefsOnUIConcrete() { 50 void UpdateCacheFromPrefsOnUIConcrete() {
49 HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI(); 51 HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI();
50 } 52 }
51 53
52 // Post tasks without a delay during tests. 54 // Post tasks without a delay during tests.
53 virtual void StartCacheUpdateTimerOnUI(base::TimeDelta delay) OVERRIDE { 55 virtual void StartCacheUpdateTimerOnUI(base::TimeDelta delay) OVERRIDE {
54 HttpServerPropertiesManager::StartCacheUpdateTimerOnUI( 56 HttpServerPropertiesManager::StartCacheUpdateTimerOnUI(
55 base::TimeDelta()); 57 base::TimeDelta());
56 } 58 }
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 // Run the task after shutdown, but before deletion. 478 // Run the task after shutdown, but before deletion.
477 loop_.RunUntilIdle(); 479 loop_.RunUntilIdle();
478 Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); 480 Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
479 http_server_props_manager_.reset(); 481 http_server_props_manager_.reset();
480 loop_.RunUntilIdle(); 482 loop_.RunUntilIdle();
481 } 483 }
482 484
483 } // namespace 485 } // namespace
484 486
485 } // namespace chrome_browser_net 487 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/http_server_properties_manager.cc ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698