summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-19 00:06:22 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-19 00:06:22 +0000
commit5b7c7d3cee3cff13b9fe681b182391e1734833ff (patch)
tree9737f5bd93a9ac8621b5d425cea8c81ed39eb819 /chrome
parent6abef1768b1f65779bf520e39e6825752971d709 (diff)
downloadchromium_src-5b7c7d3cee3cff13b9fe681b182391e1734833ff.zip
chromium_src-5b7c7d3cee3cff13b9fe681b182391e1734833ff.tar.gz
chromium_src-5b7c7d3cee3cff13b9fe681b182391e1734833ff.tar.bz2
Make safe_browsing_blocking_page.cc compile on Posix.
Review URL: http://codereview.chromium.org/21480 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser.scons1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page.cc8
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_util.cc3
-rw-r--r--chrome/chrome.xcodeproj/project.pbxproj2
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc2
-rw-r--r--chrome/common/temp_scaffolding_stubs.h15
-rw-r--r--chrome/test/perf/perftests.scons21
8 files changed, 34 insertions, 20 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index e6fab55..ac66265 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -738,7 +738,6 @@ if not env.Bit('windows'):
'printing/printer_query.cc',
'printing/win_printing_context.cc',
'rlz/rlz.cc',
- 'safe_browsing/safe_browsing_blocking_page.cc',
'sandbox_policy.cc',
'search_engines/template_url_fetcher.cc',
'shell_integration.cc',
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index 7cf8171..9d912bf 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -55,8 +55,8 @@ SafeBrowsingBlockingPage::SafeBrowsingBlockingPage(
IsMainPage(unsafe_resources),
unsafe_resources[0].url),
sb_service_(sb_service),
- unsafe_resources_(unsafe_resources),
- is_main_frame_(IsMainPage(unsafe_resources)) {
+ is_main_frame_(IsMainPage(unsafe_resources)),
+ unsafe_resources_(unsafe_resources) {
if (!is_main_frame_) {
navigation_entry_index_to_remove_ =
tab()->controller()->GetLastCommittedEntryIndex();
@@ -265,10 +265,10 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) {
// User pressed "Learn more".
GURL url;
if (unsafe_resources_[0].threat_type == SafeBrowsingService::URL_MALWARE) {
- url = GURL(l10n_util::GetString(IDS_LEARN_MORE_MALWARE_URL));
+ url = GURL(WideToUTF8(l10n_util::GetString(IDS_LEARN_MORE_MALWARE_URL)));
} else if (unsafe_resources_[0].threat_type ==
SafeBrowsingService::URL_PHISHING) {
- url = GURL(l10n_util::GetString(IDS_LEARN_MORE_PHISHING_URL));
+ url = GURL(WideToUTF8(l10n_util::GetString(IDS_LEARN_MORE_PHISHING_URL)));
} else {
NOTREACHED();
}
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index d5c1884..bb281b3 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/profile_manager.h"
+#include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
#include "chrome/browser/safe_browsing/safe_browsing_database.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/common/chrome_constants.h"
@@ -26,7 +27,6 @@
#if defined(OS_WIN)
// TODO(port): Place this header above once we've ported protocol_manager.*
#include "chrome/browser/safe_browsing/protocol_manager.h"
-#include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
#elif defined(OS_POSIX)
#include "chrome/common/temp_scaffolding_stubs.h"
#endif
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.cc b/chrome/browser/safe_browsing/safe_browsing_util.cc
index fcc185b..67edb12 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_util.cc
@@ -191,8 +191,6 @@ void FreeChunks(std::deque<SBChunk>* chunks) {
}
}
-#if defined(OS_WIN)
-// TODO(port): remove conditional #ifs when google_util is ported
GURL GeneratePhishingReportUrl(const std::string& report_page,
const std::string& url_to_report) {
Locale locale = Locale::getDefault();
@@ -208,7 +206,6 @@ GURL GeneratePhishingReportUrl(const std::string& report_page,
current_esc.c_str()));
return google_util::AppendGoogleLocaleParam(report_url);
}
-#endif
} // namespace safe_browsing_util
diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj
index 50d2675..8911015 100644
--- a/chrome/chrome.xcodeproj/project.pbxproj
+++ b/chrome/chrome.xcodeproj/project.pbxproj
@@ -75,6 +75,7 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
+ 0D71821EDDA2629232DE3AD9 /* safe_browsing_blocking_page.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BFADB0E9D49DE009A6919 /* safe_browsing_blocking_page.cc */; };
0EE123B79B750A2FCEFB4569 /* history_backend_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF9F00E9D48F7009A6919 /* history_backend_unittest.cc */; };
1C284EB767D0E3D302AC675C /* tab_restore_service.cc in Sources */ = {isa = PBXBuildFile; fileRef = B020A11D500D7519E54F2957 /* tab_restore_service.cc */; };
2760C4346D6AB3AD94E9CF05 /* url_fixer_upper.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16EF40F2145C600861FAC /* url_fixer_upper.cc */; };
@@ -5461,6 +5462,7 @@
BADB8B710F3A35AC00989B26 /* resource_dispatcher_host.cc in Sources */,
A7A214A00F3B91B100F62B4D /* resource_message_filter.cc in Sources */,
824FC1560F44C59C000299E5 /* sad_tab_view.mm in Sources */,
+ 0D71821EDDA2629232DE3AD9 /* safe_browsing_blocking_page.cc in Sources */,
4D7BFAF30E9D49EF009A6919 /* safe_browsing_database.cc in Sources */,
E48FB9590EC4E9C10052B72B /* safe_browsing_database_bloom.cc in Sources */,
E48FB95C0EC4E9DD0052B72B /* safe_browsing_database_impl.cc in Sources */,
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 287b118..78a223a 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -243,6 +243,8 @@ void TabContents::Destroy() {
// TODO(pinkerton): this isn't the real version of Destroy(), just enough to
// get the scaffolding working.
+ is_being_destroyed_ = true;
+
// Notify any observer that have a reference on this tab contents.
NotificationService::current()->Notify(
NotificationType::TAB_CONTENTS_DESTROYED,
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index 2e487ac..e7f07be 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -243,16 +243,6 @@ class PrintJobManager {
} // namespace printing
-
-class SafeBrowsingBlockingPage {
- public:
- static void ShowBlockingPage(
- SafeBrowsingService* service,
- const SafeBrowsingService::UnsafeResource& resource) {
- NOTIMPLEMENTED();
- }
-};
-
class SafeBrowsingProtocolManager {
public:
SafeBrowsingProtocolManager(SafeBrowsingService* service,
@@ -476,7 +466,8 @@ class TabContents : public PageNavigator, public NotificationObserver {
INVALIDATE_EVERYTHING = 0xFFFFFFFF
};
TabContents(TabContentsType type)
- : type_(type), is_active_(true), is_loading_(false), controller_(),
+ : type_(type), is_active_(true), is_loading_(false),
+ is_being_destroyed_(false), controller_(),
delegate_(), max_page_id_(-1) { }
virtual ~TabContents() { }
NavigationController* controller() const { return controller_; }
@@ -526,6 +517,7 @@ class TabContents : public PageNavigator, public NotificationObserver {
bool is_active() const { return is_active_; }
void set_is_active(bool active) { is_active_ = active; }
bool is_loading() const { return is_loading_; }
+ bool is_being_destroyed() const { return is_being_destroyed_; }
void SetNotWaitingForResponse() { NOTIMPLEMENTED(); }
void NotifyNavigationStateChanged(unsigned int);
TabContentsDelegate* delegate() const { return delegate_; }
@@ -560,6 +552,7 @@ class TabContents : public PageNavigator, public NotificationObserver {
TabContentsType type_;
bool is_active_;
bool is_loading_;
+ bool is_being_destroyed_;
GURL url_;
std::wstring title_;
NavigationController* controller_;
diff --git a/chrome/test/perf/perftests.scons b/chrome/test/perf/perftests.scons
index b645d38..890ed72 100644
--- a/chrome/test/perf/perftests.scons
+++ b/chrome/test/perf/perftests.scons
@@ -17,6 +17,18 @@ env.ApplySConscript([
'$GTEST_DIR/../using_gtest.scons',
'$ICU38_DIR/using_icu38.scons',
'$MODP_B64_DIR/using_modp_b64.scons',
+
+ '$BASE_DIR/gfx/using_base_gfx.scons',
+ '$BZIP2_DIR/using_bzip2.scons',
+ '$CHROME_SRC_DIR/build/using_v8.scons',
+ '$LIBJPEG_DIR/using_libjpeg.scons',
+ '$LIBPNG_DIR/using_libpng.scons',
+ '$LIBXML_DIR/using_libxml.scons',
+ '$LIBXSLT_DIR/using_libxslt.scons',
+ '$MEDIA_DIR/using_media.scons',
+ '$SDCH_DIR/using_sdch.scons',
+ '$SKIA_DIR/using_skia.scons',
+ '$ZLIB_DIR/using_zlib.scons',
])
env.Prepend(
@@ -27,6 +39,15 @@ env.Prepend(
'browser',
'common',
'sqlite',
+
+ 'JavaScriptCore_pcre',
+ 'V8Bindings',
+ 'WTF',
+ 'WebCore',
+ 'debugger',
+ 'glue',
+ 'port',
+ 'renderer',
],
)