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

Side by Side Diff: chrome/browser/search_engines/template_url_service_test_util.cc

Issue 2321453002: c/browser, c/common, components S-W: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 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 (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/search_engines/template_url_service_test_util.h" 5 #include "chrome/browser/search_engines/template_url_service_test_util.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "chrome/browser/history/history_service_factory.h" 10 #include "chrome/browser/history/history_service_factory.h"
(...skipping 29 matching lines...) Expand all
40 DISALLOW_COPY_AND_ASSIGN(TestingTemplateURLServiceClient); 40 DISALLOW_COPY_AND_ASSIGN(TestingTemplateURLServiceClient);
41 }; 41 };
42 42
43 } // namespace 43 } // namespace
44 44
45 TemplateURLServiceTestUtil::TemplateURLServiceTestUtil() 45 TemplateURLServiceTestUtil::TemplateURLServiceTestUtil()
46 : changed_count_(0), 46 : changed_count_(0),
47 search_terms_data_(NULL) { 47 search_terms_data_(NULL) {
48 // Make unique temp directory. 48 // Make unique temp directory.
49 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); 49 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
50 profile_.reset(new TestingProfile(temp_dir_.path())); 50 profile_.reset(new TestingProfile(temp_dir_.GetPath()));
51 51
52 scoped_refptr<WebDatabaseService> web_database_service = 52 scoped_refptr<WebDatabaseService> web_database_service =
53 new WebDatabaseService(temp_dir_.path().AppendASCII("webdata"), 53 new WebDatabaseService(temp_dir_.GetPath().AppendASCII("webdata"),
54 base::ThreadTaskRunnerHandle::Get(), 54 base::ThreadTaskRunnerHandle::Get(),
55 base::ThreadTaskRunnerHandle::Get()); 55 base::ThreadTaskRunnerHandle::Get());
56 web_database_service->AddTable( 56 web_database_service->AddTable(
57 std::unique_ptr<WebDatabaseTable>(new KeywordTable())); 57 std::unique_ptr<WebDatabaseTable>(new KeywordTable()));
58 web_database_service->LoadDatabase(); 58 web_database_service->LoadDatabase();
59 59
60 web_data_service_ = new KeywordWebDataService( 60 web_data_service_ = new KeywordWebDataService(
61 web_database_service.get(), base::ThreadTaskRunnerHandle::Get(), 61 web_database_service.get(), base::ThreadTaskRunnerHandle::Get(),
62 KeywordWebDataService::ProfileErrorCallback()); 62 KeywordWebDataService::ProfileErrorCallback());
63 web_data_service_->Init(); 63 web_data_service_->Init();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 DefaultSearchPrefTestUtil::SetManagedPref( 153 DefaultSearchPrefTestUtil::SetManagedPref(
154 profile()->GetTestingPrefService(), 154 profile()->GetTestingPrefService(),
155 enabled, name, keyword, search_url, suggest_url, icon_url, encodings, 155 enabled, name, keyword, search_url, suggest_url, icon_url, encodings,
156 alternate_url, search_terms_replacement_key); 156 alternate_url, search_terms_replacement_key);
157 } 157 }
158 158
159 void TemplateURLServiceTestUtil::RemoveManagedDefaultSearchPreferences() { 159 void TemplateURLServiceTestUtil::RemoveManagedDefaultSearchPreferences() {
160 DefaultSearchPrefTestUtil::RemoveManagedPref( 160 DefaultSearchPrefTestUtil::RemoveManagedPref(
161 profile()->GetTestingPrefService()); 161 profile()->GetTestingPrefService());
162 } 162 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/signature_evaluator_mac_unittest.cc ('k') | chrome/browser/shell_integration_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698