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

Side by Side Diff: chrome/browser/extensions/test_extension_prefs.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/extensions/test_extension_prefs.h" 5 #include "chrome/browser/extensions/test_extension_prefs.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 mutable base::Time current_time_; 56 mutable base::Time current_time_;
57 }; 57 };
58 58
59 } // namespace 59 } // namespace
60 60
61 TestExtensionPrefs::TestExtensionPrefs(base::SequencedTaskRunner* task_runner) 61 TestExtensionPrefs::TestExtensionPrefs(base::SequencedTaskRunner* task_runner)
62 : task_runner_(task_runner), extensions_disabled_(false) { 62 : task_runner_(task_runner), extensions_disabled_(false) {
63 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); 63 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
64 preferences_file_ = temp_dir_.path().AppendASCII("Preferences"); 64 preferences_file_ = temp_dir_.path().AppendASCII("Preferences");
65 extensions_dir_ = temp_dir_.path().AppendASCII("Extensions"); 65 extensions_dir_ = temp_dir_.path().AppendASCII("Extensions");
66 EXPECT_TRUE(file_util::CreateDirectory(extensions_dir_)); 66 EXPECT_TRUE(base::CreateDirectory(extensions_dir_));
67 67
68 ResetPrefRegistry(); 68 ResetPrefRegistry();
69 RecreateExtensionPrefs(); 69 RecreateExtensionPrefs();
70 } 70 }
71 71
72 TestExtensionPrefs::~TestExtensionPrefs() { 72 TestExtensionPrefs::~TestExtensionPrefs() {
73 } 73 }
74 74
75 PrefService* TestExtensionPrefs::pref_service() { 75 PrefService* TestExtensionPrefs::pref_service() {
76 return pref_service_.get(); 76 return pref_service_.get();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const { 175 PrefService* TestExtensionPrefs::CreateIncognitoPrefService() const {
176 return pref_service_->CreateIncognitoPrefService( 176 return pref_service_->CreateIncognitoPrefService(
177 new ExtensionPrefStore(extension_pref_value_map_.get(), true)); 177 new ExtensionPrefStore(extension_pref_value_map_.get(), true));
178 } 178 }
179 179
180 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) { 180 void TestExtensionPrefs::set_extensions_disabled(bool extensions_disabled) {
181 extensions_disabled_ = extensions_disabled; 181 extensions_disabled_ = extensions_disabled;
182 } 182 }
183 183
184 } // namespace extensions 184 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_startup_browsertest.cc ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698