| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #ifdef CHROME_PERSONALIZATION | 4 #ifdef CHROME_PERSONALIZATION |
| 5 | 5 |
| 6 #include "chrome/test/live_sync/live_bookmarks_sync_test.h" | 6 #include "chrome/test/live_sync/live_bookmarks_sync_test.h" |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 // static | 76 // static |
| 77 Profile* LiveBookmarksSyncTest::MakeProfile(const string16& name) { | 77 Profile* LiveBookmarksSyncTest::MakeProfile(const string16& name) { |
| 78 string16 path_string; | 78 string16 path_string; |
| 79 PathService::Get(chrome::DIR_USER_DATA, &path_string); | 79 PathService::Get(chrome::DIR_USER_DATA, &path_string); |
| 80 file_util::AppendToPath(&path_string, name); | 80 file_util::AppendToPath(&path_string, name); |
| 81 FilePath path(path_string); | 81 FilePath path(path_string); |
| 82 return ProfileManager::CreateProfile(path, name, L"", L""); | 82 return ProfileManager::CreateProfile(path, name, L"", L""); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void LiveBookmarksSyncTest::SetUpInProcessBrowserTestFixture() { |
| 86 // We don't take a reference to |resolver|, but mock_host_resolver_override_ |
| 87 // does, so effectively assumes ownership. |
| 88 net::RuleBasedHostResolverProc* resolver = |
| 89 new net::RuleBasedHostResolverProc(host_resolver()); |
| 90 resolver->AllowDirectLookup("*.google.com"); |
| 91 mock_host_resolver_override_.reset( |
| 92 new net::ScopedDefaultHostResolverProc(resolver)); |
| 93 } |
| 94 |
| 95 void LiveBookmarksSyncTest::TearDownInProcessBrowserTestFixture() { |
| 96 mock_host_resolver_override_.reset(); |
| 97 } |
| 98 |
| 85 #endif // CHROME_PERSONALIZATION | 99 #endif // CHROME_PERSONALIZATION |
| OLD | NEW |