Commit afcc20da authored by rsleevi@chromium.org's avatar rsleevi@chromium.org

Fix compile on linux_redux bots, caused by http://crrev.com/113808

linux_redux does not have safe_browsing enabled in the GYP variables,
which causes all of chrome/browser/safe_browsing to be excluded from
the chrome_browser target - including safe_browsing_tab_observer.[cc,h]

This enables a stub SafeBrowsingTabObserver to be compiled when
safe_browsing==0, fixing the linker errors from TabContentsWrapper having
a SafeBrowsingTabObserver member.

BUG=none

Review URL: http://codereview.chromium.org/8909017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114553 0039d316-1c4b-4281-b951-d872f2087c98
parent a34d1370
......@@ -7,7 +7,6 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/client_side_detection_host.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
......@@ -17,8 +16,19 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#if defined(ENABLE_SAFE_BROWSING)
#include "chrome/browser/safe_browsing/client_side_detection_host.h"
#endif
namespace safe_browsing {
#if !defined(ENABLE_SAFE_BROWSING)
// Provide a dummy implementation so that scoped_ptr<ClientSideDetectionHost>
// has a concrete destructor to call. This is necessary because it is used
// as a member of SafeBrowsingTabObserver, even if it only ever contains NULL.
class ClientSideDetectionHost { };
#endif
SafeBrowsingTabObserver::SafeBrowsingTabObserver(
TabContentsWrapper* wrapper) : wrapper_(wrapper) {
#if defined(ENABLE_SAFE_BROWSING)
......
......@@ -4190,6 +4190,8 @@
],
'sources/': [
['exclude', '^browser/safe_browsing/'],
['include', '^browser/safe_browsing/safe_browsing_tab_observer.cc'],
['include', '^browser/safe_browsing/safe_browsing_tab_observer.h'],
],
}],
['chromeos==0', {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment