summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-20 00:20:18 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-20 00:20:18 +0000
commit5a276d40205cb3c1aa50e088336aceefc9ba5f29 (patch)
treeab4f904ad71d64ad74f08c048341513616d9183e
parent7d5738c000289121ebc5e3a303fd9b9e04300b7b (diff)
downloadchromium_src-5a276d40205cb3c1aa50e088336aceefc9ba5f29.zip
chromium_src-5a276d40205cb3c1aa50e088336aceefc9ba5f29.tar.gz
chromium_src-5a276d40205cb3c1aa50e088336aceefc9ba5f29.tar.bz2
Make template_url_fetcher.cc compile on Posix.
Review URL: http://codereview.chromium.org/20522 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10065 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser.scons2
-rw-r--r--chrome/browser/search_engines/template_url_fetcher.cc20
-rw-r--r--chrome/chrome.xcodeproj/project.pbxproj2
3 files changed, 17 insertions, 7 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index 16adc5d..11878ed 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -730,8 +730,6 @@ if not env.Bit('windows'):
'printing/printer_query.cc',
'printing/win_printing_context.cc',
'rlz/rlz.cc',
- 'sandbox_policy.cc',
- 'search_engines/template_url_fetcher.cc',
'shell_integration.cc',
'tab_contents/native_ui_contents.cc',
'tab_contents/render_view_context_menu.cc',
diff --git a/chrome/browser/search_engines/template_url_fetcher.cc b/chrome/browser/search_engines/template_url_fetcher.cc
index d5f043e..3627092 100644
--- a/chrome/browser/search_engines/template_url_fetcher.cc
+++ b/chrome/browser/search_engines/template_url_fetcher.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "build/build_config.h"
+
#include "chrome/browser/search_engines/template_url_fetcher.h"
#include "chrome/browser/net/url_fetcher.h"
@@ -9,7 +11,10 @@
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/search_engines/template_url_parser.h"
+
+#if defined(OS_WIN)
#include "chrome/browser/views/edit_keyword_controller.h"
+#endif
// RequestDelegate ------------------------------------------------------------
class TemplateURLFetcher::RequestDelegate : public URLFetcher::Delegate {
@@ -20,14 +25,14 @@ class TemplateURLFetcher::RequestDelegate : public URLFetcher::Delegate {
const GURL& favicon_url,
gfx::NativeView parent_window,
bool autodetected)
-#pragma warning(disable:4355)
- : url_fetcher_(osdd_url, URLFetcher::GET, this),
+ : ALLOW_THIS_IN_INITIALIZER_LIST(url_fetcher_(osdd_url,
+ URLFetcher::GET, this)),
fetcher_(fetcher),
keyword_(keyword),
osdd_url_(osdd_url),
favicon_url_(favicon_url),
- parent_window_(parent_window),
- autodetected_(autodetected) {
+ autodetected_(autodetected),
+ parent_window_(parent_window) {
url_fetcher_.set_request_context(fetcher->profile()->GetRequestContext());
url_fetcher_.Start();
}
@@ -117,6 +122,7 @@ void TemplateURLFetcher::RequestDelegate::OnURLFetchComplete(
template_url->set_safe_for_autoreplace(true);
model->Add(template_url.release());
} else {
+#if defined(OS_WIN)
// Confirm addition and allow user to edit default choices. It's ironic
// that only *non*-autodetected additions get confirmed, but the user
// expects feedback that his action did something.
@@ -128,6 +134,10 @@ void TemplateURLFetcher::RequestDelegate::OnURLFetchComplete(
NULL, // no KeywordEditorView
fetcher_->profile());
controller->Show();
+#else
+ // TODO(port): port EditKeywordController.
+ NOTIMPLEMENTED() << "EditKeywordController.";
+#endif
}
}
fetcher_->RequestCompleted(this);
@@ -146,7 +156,7 @@ TemplateURLFetcher::~TemplateURLFetcher() {
void TemplateURLFetcher::ScheduleDownload(const std::wstring& keyword,
const GURL& osdd_url,
const GURL& favicon_url,
- const HWND parent_window,
+ const gfx::NativeView parent_window,
bool autodetected) {
DCHECK(!keyword.empty() && osdd_url.is_valid());
// Make sure we aren't already downloading this request.
diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj
index e0112a40..3d5b11b 100644
--- a/chrome/chrome.xcodeproj/project.pbxproj
+++ b/chrome/chrome.xcodeproj/project.pbxproj
@@ -376,6 +376,7 @@
CA81330E0F423C4D0096C1DC /* query_parser_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BFA020E9D48F7009A6919 /* query_parser_unittest.cc */; };
CA8133120F423C710096C1DC /* url_database_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BFA150E9D48F7009A6919 /* url_database_unittest.cc */; };
CA81331D0F423DB40096C1DC /* pref_member_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BFBE70E9D4C9F009A6919 /* pref_member_unittest.cc */; };
+ CABE9938BF2DF78D9862DC8B /* template_url_fetcher.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16EDB0F21455600861FAC /* template_url_fetcher.cc */; };
D87A8ECE6652FC99AF1ADA6F /* ssl_manager.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16ECC0F21451600861FAC /* ssl_manager.cc */; };
DDB41CECE38B852000F30D9F /* browsing_data_remover.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF84E0E9D4839009A6919 /* browsing_data_remover.cc */; };
E40CC5E30F2E348900708647 /* history_contents_provider.cc in Sources */ = {isa = PBXBuildFile; fileRef = E40CC5E10F2E348900708647 /* history_contents_provider.cc */; };
@@ -5511,6 +5512,7 @@
E46C53AA0F2F662F00B393B8 /* tab_strip_model_order_controller.cc in Sources */,
BA3176FD0F410A2F0065D532 /* tab_util.cc in Sources */,
82684FEB0F2FC650009F6555 /* template_url.cc in Sources */,
+ CABE9938BF2DF78D9862DC8B /* template_url_fetcher.cc in Sources */,
826857820F3234E4009F6555 /* template_url_model.cc in Sources */,
B9BF55F87A4BB2FD366B6DDC /* template_url_parser.cc in Sources */,
826857C20F32391B009F6555 /* template_url_prepopulate_data.cc in Sources */,