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

Unified Diff: chrome_frame/test/net/fake_external_tab.cc

Issue 11027070: Moved JsonPrefStore to use SequencedWorkerPool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
Index: chrome_frame/test/net/fake_external_tab.cc
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index 87f30650054cfabc3483ecb3469f26c86c49ae90..00f7659746c37d99bc3e3964fa61c978691d24a5 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -18,6 +18,7 @@
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
+#include "base/prefs/json_pref_store.h"
#include "base/scoped_temp_dir.h"
#include "base/string_piece.h"
#include "base/string_util.h"
@@ -353,8 +354,9 @@ void FilterDisabledTests() {
// Same as BrowserProcessImpl, but uses custom profile manager.
class FakeBrowserProcessImpl : public BrowserProcessImpl {
public:
- explicit FakeBrowserProcessImpl(const CommandLine& command_line)
- : BrowserProcessImpl(command_line) {
+ FakeBrowserProcessImpl(base::SequencedTaskRunner* local_state_task_runner,
+ const CommandLine& command_line)
+ : BrowserProcessImpl(local_state_task_runner, command_line) {
profiles_dir_.CreateUniqueTempDir();
}
@@ -495,7 +497,13 @@ void FakeExternalTab::Initialize() {
cmd->AppendSwitch(switches::kDisableWebResources);
cmd->AppendSwitch(switches::kSingleProcess);
- browser_process_.reset(new FakeBrowserProcessImpl(*cmd));
+ FilePath local_state_path;
+ CHECK(PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path));
+ scoped_refptr<base::SequencedTaskRunner> local_state_task_runner =
+ JsonPrefStore::GetTaskRunnerForFile(local_state_path,
+ BrowserThread::GetBlockingPool());
+ browser_process_.reset(new FakeBrowserProcessImpl(local_state_task_runner,
+ *cmd));
// BrowserProcessImpl's constructor should set g_browser_process.
DCHECK(g_browser_process);
g_browser_process->SetApplicationLocale("en-US");
« chrome/browser/profiles/profile_impl.cc ('K') | « chrome/test/reliability/page_load_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698