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

Unified Diff: chrome/test/base/testing_browser_process.cc

Issue 11418005: Get a minimal unit_tests target building and running for iOS (Closed) Base URL: http://git.chromium.org/chromium/src.git@chrome-gyp-ios-support
Patch Set: Better ifdefing in chrome_paths 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
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_browser_process.cc
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc
index 74b9b65d5f90f6b933f9bf4ea96f5f959cfb74b5..2739d709103bc265d7d881ee9b18febe58befbb8 100644
--- a/chrome/test/base/testing_browser_process.cc
+++ b/chrome/test/base/testing_browser_process.cc
@@ -5,18 +5,23 @@
#include "chrome/test/base/testing_browser_process.h"
#include "base/string_util.h"
-#include "chrome/browser/notifications/notification_ui_manager.h"
+#include "build/build_config.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h"
+#include "content/public/browser/notification_service.h"
+#include "net/url_request/url_request_context_getter.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+#if !defined(OS_IOS)
+#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/prerender/prerender_tracker.h"
#include "chrome/browser/printing/background_printing_manager.h"
#include "chrome/browser/printing/print_preview_tab_controller.h"
-#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/thumbnails/render_widget_snapshot_taker.h"
-#include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h"
#include "content/public/browser/notification_service.h"
-#include "net/url_request/url_request_context_getter.h"
-#include "testing/gtest/include/gtest/gtest.h"
+#endif
#if defined(ENABLE_CONFIGURATION_POLICY)
#include "chrome/browser/policy/browser_policy_connector.h"
@@ -29,7 +34,9 @@ TestingBrowserProcess::TestingBrowserProcess()
module_ref_count_(0),
app_locale_("en"),
local_state_(NULL),
+#if !defined(OS_IOS)
render_widget_snapshot_taker_(new RenderWidgetSnapshotTaker),
+#endif
io_thread_(NULL),
system_request_context_(NULL) {
}
@@ -61,11 +68,18 @@ WatchDogThread* TestingBrowserProcess::watchdog_thread() {
}
ProfileManager* TestingBrowserProcess::profile_manager() {
+#if defined(OS_IOS)
+ NOTIMPLEMENTED();
+ return NULL;
+#else
return profile_manager_.get();
+#endif
}
void TestingBrowserProcess::SetProfileManager(ProfileManager* profile_manager) {
+#if !defined(OS_IOS)
profile_manager_.reset(profile_manager);
+#endif
}
PrefService* TestingBrowserProcess::local_state() {
@@ -89,7 +103,10 @@ policy::BrowserPolicyConnector*
}
policy::PolicyService* TestingBrowserProcess::policy_service() {
-#if defined(ENABLE_CONFIGURATION_POLICY)
+#if defined(OS_IOS)
+ NOTIMPLEMENTED();
+ return NULL;
+#elif defined(ENABLE_CONFIGURATION_POLICY)
return browser_policy_connector()->GetPolicyService();
#else
if (!policy_service_)
@@ -104,7 +121,12 @@ IconManager* TestingBrowserProcess::icon_manager() {
RenderWidgetSnapshotTaker*
TestingBrowserProcess::GetRenderWidgetSnapshotTaker() {
+#if defined(OS_IOS)
+ NOTREACHED();
+ return NULL;
+#else
return render_widget_snapshot_taker_.get();
+#endif
}
BackgroundModeManager* TestingBrowserProcess::background_mode_manager() {
@@ -116,7 +138,12 @@ StatusTray* TestingBrowserProcess::status_tray() {
}
SafeBrowsingService* TestingBrowserProcess::safe_browsing_service() {
+#if defined(OS_IOS)
+ NOTIMPLEMENTED();
+ return NULL;
+#else
return sb_service_.get();
+#endif
}
safe_browsing::ClientSideDetectionService*
@@ -231,9 +258,14 @@ ChromeNetLog* TestingBrowserProcess::net_log() {
}
prerender::PrerenderTracker* TestingBrowserProcess::prerender_tracker() {
+#if defined(OS_IOS)
+ NOTIMPLEMENTED();
+ return NULL;
+#else
if (!prerender_tracker_.get())
prerender_tracker_.reset(new prerender::PrerenderTracker());
return prerender_tracker_.get();
+#endif
}
ComponentUpdateService* TestingBrowserProcess::component_updater() {
@@ -245,12 +277,19 @@ CRLSetFetcher* TestingBrowserProcess::crl_set_fetcher() {
}
BookmarkPromptController* TestingBrowserProcess::bookmark_prompt_controller() {
+#if defined(OS_IOS)
+ NOTIMPLEMENTED();
+ return NULL;
+#else
return bookmark_prompt_controller_.get();
+#endif
}
void TestingBrowserProcess::SetBookmarkPromptController(
BookmarkPromptController* controller) {
+#if !defined(OS_IOS)
bookmark_prompt_controller_.reset(controller);
+#endif
}
void TestingBrowserProcess::SetSystemRequestContext(
@@ -269,7 +308,9 @@ void TestingBrowserProcess::SetLocalState(PrefService* local_state) {
// (assumedly as part of exiting the test and freeing TestingBrowserProcess)
// any components owned by TestingBrowserProcess that depend on local_state
// are also freed.
+#if !defined(OS_IOS)
notification_ui_manager_.reset();
+#endif
#if defined(ENABLE_CONFIGURATION_POLICY)
SetBrowserPolicyConnector(NULL);
#endif
@@ -294,5 +335,8 @@ void TestingBrowserProcess::SetBrowserPolicyConnector(
void TestingBrowserProcess::SetSafeBrowsingService(
SafeBrowsingService* sb_service) {
+#if !defined(OS_IOS)
+ NOTIMPLEMENTED();
sb_service_ = sb_service;
+#endif
}
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698