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

Side by Side Diff: chrome/browser/extensions/settings/settings_frontend_unittest.cc

Issue 11359217: Move scoped_temp_dir from base to base/files (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 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 11 #include "base/message_loop.h"
11 #include "base/scoped_temp_dir.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "chrome/browser/extensions/settings/leveldb_settings_storage_factory.h" 13 #include "chrome/browser/extensions/settings/leveldb_settings_storage_factory.h"
14 #include "chrome/browser/extensions/settings/settings_frontend.h" 14 #include "chrome/browser/extensions/settings/settings_frontend.h"
15 #include "chrome/browser/extensions/settings/settings_namespace.h" 15 #include "chrome/browser/extensions/settings/settings_namespace.h"
16 #include "chrome/browser/extensions/settings/settings_test_util.h" 16 #include "chrome/browser/extensions/settings/settings_test_util.h"
17 #include "chrome/browser/value_store/value_store.h" 17 #include "chrome/browser/value_store/value_store.h"
18 #include "chrome/common/chrome_notification_types.h" 18 #include "chrome/common/chrome_notification_types.h"
19 #include "content/public/test/test_browser_thread.h" 19 #include "content/public/test/test_browser_thread.h"
20 20
21 using content::BrowserThread; 21 using content::BrowserThread;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 message_loop_.RunAllPending(); 70 message_loop_.RunAllPending();
71 } 71 }
72 72
73 protected: 73 protected:
74 void ResetFrontend() { 74 void ResetFrontend() {
75 storage_factory_->Reset(new LeveldbSettingsStorageFactory()); 75 storage_factory_->Reset(new LeveldbSettingsStorageFactory());
76 frontend_.reset( 76 frontend_.reset(
77 SettingsFrontend::Create(storage_factory_.get(), profile_.get())); 77 SettingsFrontend::Create(storage_factory_.get(), profile_.get()));
78 } 78 }
79 79
80 ScopedTempDir temp_dir_; 80 base::ScopedTempDir temp_dir_;
81 scoped_ptr<util::MockProfile> profile_; 81 scoped_ptr<util::MockProfile> profile_;
82 scoped_ptr<SettingsFrontend> frontend_; 82 scoped_ptr<SettingsFrontend> frontend_;
83 scoped_refptr<util::ScopedSettingsStorageFactory> storage_factory_; 83 scoped_refptr<util::ScopedSettingsStorageFactory> storage_factory_;
84 84
85 private: 85 private:
86 MessageLoop message_loop_; 86 MessageLoop message_loop_;
87 content::TestBrowserThread ui_thread_; 87 content::TestBrowserThread ui_thread_;
88 content::TestBrowserThread file_thread_; 88 content::TestBrowserThread file_thread_;
89 }; 89 };
90 90
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 frontend_->RunWithStorage( 270 frontend_->RunWithStorage(
271 id, settings::SYNC, base::Bind(&UnlimitedSyncStorageTestCallback)); 271 id, settings::SYNC, base::Bind(&UnlimitedSyncStorageTestCallback));
272 frontend_->RunWithStorage( 272 frontend_->RunWithStorage(
273 id, settings::LOCAL, base::Bind(&UnlimitedLocalStorageTestCallback)); 273 id, settings::LOCAL, base::Bind(&UnlimitedLocalStorageTestCallback));
274 274
275 MessageLoop::current()->RunAllPending(); 275 MessageLoop::current()->RunAllPending();
276 } 276 }
277 277
278 } // namespace extensions 278 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/sandboxed_unpacker_unittest.cc ('k') | chrome/browser/extensions/settings/settings_sync_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698