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

Unified Diff: chrome/browser/ui/app_list/test/fake_profile_store.cc

Issue 24707002: Add unit tests for AppListServiceImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/test/fake_profile_store.cc
diff --git a/chrome/browser/ui/app_list/test/fake_profile_store.cc b/chrome/browser/ui/app_list/test/fake_profile_store.cc
new file mode 100644
index 0000000000000000000000000000000000000000..370f790d92e7f8527aa01dd2b22cace578ebb916
--- /dev/null
+++ b/chrome/browser/ui/app_list/test/fake_profile_store.cc
@@ -0,0 +1,35 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/app_list/test/fake_profile_store.h"
+
+FakeProfileStore::FakeProfileStore(const base::FilePath& user_data_dir)
+ : user_data_dir_(user_data_dir) {
+}
+
+void FakeProfileStore::RunCallbackByPath(const base::FilePath& path,
+ Profile* profile) {
+ DCHECK(callbacks_.find(path) != callbacks_.end());
+ callbacks_[path].Run(profile);
+ callbacks_.erase(path);
+}
+
+void FakeProfileStore::AddProfileObserver(
+ ProfileInfoCacheObserver* observer) {
+}
+
+void FakeProfileStore::LoadProfileAsync(
+ const base::FilePath& path,
+ base::Callback<void(Profile*)> callback) {
+ callbacks_[path] = callback;
+}
+
+Profile* FakeProfileStore::GetProfileByPath(
+ const base::FilePath& path) {
+ return NULL;
+}
+
+base::FilePath FakeProfileStore::GetUserDataDir() {
+ return user_data_dir_;
+}

Powered by Google App Engine
This is Rietveld 408576698