diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-24 18:28:26 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-24 18:28:26 +0000 |
commit | f5462fdb35a3e41308c49b3308d59ab94f52bb58 (patch) | |
tree | 0b68904dd5d14ac18d7b6a645de3857b9d3460fd | |
parent | 1c73d92f5f54be1739a18ad26e6cce1cea4772be (diff) | |
download | chromium_src-f5462fdb35a3e41308c49b3308d59ab94f52bb58.zip chromium_src-f5462fdb35a3e41308c49b3308d59ab94f52bb58.tar.gz chromium_src-f5462fdb35a3e41308c49b3308d59ab94f52bb58.tar.bz2 |
Update chrome/renderer to reflect WEBKIT_FRAME_TO_DOCUMENT_API_MOVE
Review URL: http://codereview.chromium.org/7241013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90391 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/renderer/autofill/form_manager.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/autofill/password_autofill_manager.cc | 10 | ||||
-rw-r--r-- | chrome/renderer/chrome_content_renderer_client.cc | 18 | ||||
-rw-r--r-- | chrome/renderer/chrome_render_process_observer.cc | 3 | ||||
-rw-r--r-- | chrome/renderer/chrome_render_view_observer.cc | 13 | ||||
-rw-r--r-- | chrome/renderer/content_settings_observer.cc | 48 | ||||
-rw-r--r-- | chrome/renderer/external_extension.cc | 6 | ||||
-rw-r--r-- | chrome/renderer/page_load_histograms.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/safe_browsing/malware_dom_details.cc | 25 | ||||
-rw-r--r-- | chrome/renderer/safe_browsing/phishing_classifier.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/safe_browsing/phishing_classifier_delegate.cc | 3 | ||||
-rw-r--r-- | chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc | 4 |
12 files changed, 80 insertions, 63 deletions
diff --git a/chrome/renderer/autofill/form_manager.cc b/chrome/renderer/autofill/form_manager.cc index 327f77c..1789a4d 100644 --- a/chrome/renderer/autofill/form_manager.cc +++ b/chrome/renderer/autofill/form_manager.cc @@ -658,7 +658,7 @@ bool FormManager::WebFormElementToFormData(const WebFormElement& element, form->name = GetFormIdentifier(element); form->method = element.method(); - form->origin = frame->url(); + form->origin = frame->document().url(); form->action = frame->document().completeURL(element.action()); form->user_submitted = element.wasUserSubmitted(); @@ -766,7 +766,7 @@ void FormManager::ExtractForms(const WebFrame* frame, ResetFrame(frame); WebVector<WebFormElement> web_forms; - frame->forms(web_forms); + frame->document().forms(web_forms); size_t num_fields_seen = 0; for (size_t i = 0; i < web_forms.size(); ++i) { diff --git a/chrome/renderer/autofill/password_autofill_manager.cc b/chrome/renderer/autofill/password_autofill_manager.cc index ede7b1a..ed31d67 100644 --- a/chrome/renderer/autofill/password_autofill_manager.cc +++ b/chrome/renderer/autofill/password_autofill_manager.cc @@ -111,12 +111,12 @@ void FindFormElements(WebKit::WebView* view, if (!doc.isHTMLDocument()) continue; - GURL full_origin(f->url()); + GURL full_origin(doc.url()); if (data.origin != full_origin.ReplaceComponents(rep)) continue; WebKit::WebVector<WebKit::WebFormElement> forms; - f->forms(forms); + doc.forms(forms); for (size_t i = 0; i < forms.size(); ++i) { WebKit::WebFormElement fe = forms[i]; @@ -325,12 +325,12 @@ bool PasswordAutofillManager::DidSelectAutofillSuggestion( void PasswordAutofillManager::SendPasswordForms(WebKit::WebFrame* frame, bool only_visible) { // Make sure that this security origin is allowed to use password manager. - WebKit::WebSecurityOrigin security_origin = frame->securityOrigin(); - if (!security_origin.canAccessPasswordManager()) + WebKit::WebSecurityOrigin origin = frame->document().securityOrigin(); + if (!origin.canAccessPasswordManager()) return; WebKit::WebVector<WebKit::WebFormElement> forms; - frame->forms(forms); + frame->document().forms(forms); std::vector<webkit_glue::PasswordForm> password_forms; for (size_t i = 0; i < forms.size(); ++i) { diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index 21b8e41..af1908e 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc @@ -70,6 +70,7 @@ #include "net/base/net_errors.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" @@ -254,7 +255,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( GURL url(original_params.url); std::string actual_mime_type; render_view->Send(new ViewHostMsg_GetPluginInfo( - render_view->routing_id(), url, frame->top()->url(), + render_view->routing_id(), url, frame->top()->document().url(), original_params.mimeType.utf8(), &found, &info, &actual_mime_type)); if (!found) @@ -271,7 +272,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if (cmd->HasSwitch(switches::kEnableResourceContentSettings)) resource = group->identifier(); render_view->Send(new ViewHostMsg_GetPluginContentSetting( - frame->top()->url(), resource, &plugin_setting)); + frame->top()->document().url(), resource, &plugin_setting)); DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT); WebPluginParams params(original_params); @@ -396,7 +397,7 @@ void ChromeContentRendererClient::ShowErrorPage(RenderView* render_view, if (LocalizedError::HasStrings(LocalizedError::kHttpErrorDomain, http_status_code)) { WebURLError error; - error.unreachableURL = frame->url(); + error.unreachableURL = frame->document().url(); error.domain = WebString::fromUTF8(LocalizedError::kHttpErrorDomain); error.reason = http_status_code; @@ -498,7 +499,9 @@ bool ChromeContentRendererClient::WillSendRequest(WebKit::WebFrame* frame, // the request and cause an error. if (url.SchemeIs(chrome::kExtensionScheme) && !ExtensionResourceRequestPolicy::CanRequestResource( - url, GURL(frame->url()), extension_dispatcher_->extensions())) { + url, + GURL(frame->document().url()), + extension_dispatcher_->extensions())) { *new_url = GURL("chrome-extension://invalid/"); return true; } @@ -563,9 +566,12 @@ bool ChromeContentRendererClient::CrossesExtensionExtents(WebFrame* frame, const ExtensionSet* extensions = extension_dispatcher_->extensions(); // If the URL is still empty, this is a window.open navigation. Check the // opener's URL. - GURL old_url(frame->url()); + // TODO(abarth): This code is super sketchy! Are you sure looking at the + // opener is correct here? This appears to let me steal my opener's + // privileges if I can make my URL be "empty." + GURL old_url(frame->document().url()); if (old_url.is_empty() && frame->opener()) - old_url = frame->opener()->url(); + old_url = frame->opener()->document().url(); // If this is a reload, check whether it has the wrong process type. We // should send it to the browser if it's an extension URL (e.g., hosted app) diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc index a346ae6..a616a42 100644 --- a/chrome/renderer/chrome_render_process_observer.cc +++ b/chrome/renderer/chrome_render_process_observer.cc @@ -32,6 +32,7 @@ #include "net/base/net_module.h" #include "third_party/sqlite/sqlite3.h" #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCrossOriginPreflightResultCache.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFontCache.h" @@ -117,7 +118,7 @@ class RenderViewContentSettingsSetter : public RenderViewVisitor { } virtual bool Visit(RenderView* render_view) { - if (GURL(render_view->webview()->mainFrame()->url()) == url_) { + if (GURL(render_view->webview()->mainFrame()->document().url()) == url_) { ContentSettingsObserver::Get(render_view)->SetContentSettings( content_settings_); } diff --git a/chrome/renderer/chrome_render_view_observer.cc b/chrome/renderer/chrome_render_view_observer.cc index e24330e..141fb07 100644 --- a/chrome/renderer/chrome_render_view_observer.cc +++ b/chrome/renderer/chrome_render_view_observer.cc @@ -30,6 +30,7 @@ #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" @@ -372,7 +373,7 @@ bool ChromeRenderViewObserver::allowReadFromClipboard(WebFrame* frame, bool default_value) { bool allowed = false; Send(new ViewHostMsg_CanTriggerClipboardRead( - routing_id(), frame->url(), &allowed)); + routing_id(), frame->document().url(), &allowed)); return allowed; } @@ -380,7 +381,7 @@ bool ChromeRenderViewObserver::allowWriteToClipboard(WebFrame* frame, bool default_value) { bool allowed = false; Send(new ViewHostMsg_CanTriggerClipboardWrite( - routing_id(), frame->url(), &allowed)); + routing_id(), frame->document().url(), &allowed)); return allowed; } @@ -438,8 +439,8 @@ void ChromeRenderViewObserver::DidStopLoading() { false), render_view()->content_state_immediately() ? 0 : kDelayForCaptureMs); - GURL osd_url = - render_view()->webview()->mainFrame()->openSearchDescriptionURL(); + WebFrame* main_frame = render_view()->webview()->mainFrame(); + GURL osd_url = main_frame->document().openSearchDescriptionURL(); if (!osd_url.is_empty()) { Send(new ViewHostMsg_PageHasOSDD( routing_id(), render_view()->page_id(), osd_url, @@ -539,7 +540,7 @@ void ChromeRenderViewObserver::CapturePageInfo(int load_id, last_indexed_page_id_ = load_id; // Get the URL for this page. - GURL url(main_frame->url()); + GURL url(main_frame->document().url()); if (url.is_empty()) return; @@ -604,7 +605,7 @@ void ChromeRenderViewObserver::CaptureThumbnail() { return; // get the URL for this page - GURL url(main_frame->url()); + GURL url(main_frame->document().url()); if (url.is_empty()) return; diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc index 42ebb07..b3df59f 100644 --- a/chrome/renderer/content_settings_observer.cc +++ b/chrome/renderer/content_settings_observer.cc @@ -10,6 +10,7 @@ #include "content/common/view_messages.h" #include "content/renderer/render_view.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" @@ -26,7 +27,7 @@ namespace { // True if |frame| contains content that is white-listed for content settings. static bool IsWhitelistedForContentSettings(WebFrame* frame) { - WebSecurityOrigin origin = frame->securityOrigin(); + WebSecurityOrigin origin = frame->document().securityOrigin(); if (origin.isEmpty()) return false; // Uninitialized document? @@ -35,12 +36,12 @@ static bool IsWhitelistedForContentSettings(WebFrame* frame) { // If the scheme is ftp: or file:, an empty file name indicates a directory // listing, which requires JavaScript to function properly. - GURL frame_url = frame->url(); + GURL document_url = frame->document().url(); const char* kDirProtocols[] = { chrome::kFtpScheme, chrome::kFileScheme }; for (size_t i = 0; i < arraysize(kDirProtocols); ++i) { if (EqualsASCII(origin.protocol(), kDirProtocols[i])) { - return frame_url.SchemeIs(kDirProtocols[i]) && - frame_url.ExtractFileName().empty(); + return document_url.SchemeIs(kDirProtocols[i]) && + document_url.ExtractFileName().empty(); } } @@ -120,9 +121,9 @@ void ContentSettingsObserver::DidCommitProvisionalLoad( ClearBlockedContentSettings(); plugins_temporarily_allowed_ = false; - GURL url = frame->url(); + GURL url = frame->document().url(); - if (frame->securityOrigin().toString() == "null" && + if (frame->document().securityOrigin().toString() == "null" && !url.SchemeIs(chrome::kFileScheme)) { // The Frame has a unique security origin. Instead of granting the frame // privileges based on it's URL, we fall back to the default content @@ -165,27 +166,27 @@ bool ContentSettingsObserver::AllowDatabase(WebFrame* frame, const WebString& name, const WebString& display_name, unsigned long estimated_size) { - if (frame->securityOrigin().isEmpty() || - frame->top()->securityOrigin().isEmpty()) + if (frame->document().securityOrigin().isEmpty() || + frame->top()->document().securityOrigin().isEmpty()) return false; // Uninitialized document. bool result = false; Send(new ViewHostMsg_AllowDatabase( - routing_id(), GURL(frame->securityOrigin().toString()), - GURL(frame->top()->securityOrigin().toString()), + routing_id(), GURL(frame->document().securityOrigin().toString()), + GURL(frame->top()->document().securityOrigin().toString()), name, display_name, &result)); return result; } bool ContentSettingsObserver::AllowFileSystem(WebFrame* frame) { - if (frame->securityOrigin().isEmpty() || - frame->top()->securityOrigin().isEmpty()) + if (frame->document().securityOrigin().isEmpty() || + frame->top()->document().securityOrigin().isEmpty()) return false; // Uninitialized document. bool result = false; Send(new ViewHostMsg_AllowFileSystem( - routing_id(), GURL(frame->securityOrigin().toString()), - GURL(frame->top()->securityOrigin().toString()), &result)); + routing_id(), GURL(frame->document().securityOrigin().toString()), + GURL(frame->top()->document().securityOrigin().toString()), &result)); return result; } @@ -206,14 +207,14 @@ bool ContentSettingsObserver::AllowImages(WebFrame* frame, bool ContentSettingsObserver::AllowIndexedDB(WebFrame* frame, const WebString& name, const WebSecurityOrigin& origin) { - if (frame->securityOrigin().isEmpty() || - frame->top()->securityOrigin().isEmpty()) + if (frame->document().securityOrigin().isEmpty() || + frame->top()->document().securityOrigin().isEmpty()) return false; // Uninitialized document. bool result = false; Send(new ViewHostMsg_AllowIndexedDB( - routing_id(), GURL(frame->securityOrigin().toString()), - GURL(frame->top()->securityOrigin().toString()), + routing_id(), GURL(frame->document().securityOrigin().toString()), + GURL(frame->top()->document().securityOrigin().toString()), name, &result)); return result; } @@ -237,20 +238,21 @@ bool ContentSettingsObserver::AllowScript(WebFrame* frame, } bool ContentSettingsObserver::AllowStorage(WebFrame* frame, bool local) { - if (frame->securityOrigin().isEmpty() || - frame->top()->securityOrigin().isEmpty()) + if (frame->document().securityOrigin().isEmpty() || + frame->top()->document().securityOrigin().isEmpty()) return false; // Uninitialized document. bool result = false; - StoragePermissionsKey key(GURL(frame->securityOrigin().toString()), local); + StoragePermissionsKey key( + GURL(frame->document().securityOrigin().toString()), local); std::map<StoragePermissionsKey, bool>::const_iterator permissions = cached_storage_permissions_.find(key); if (permissions != cached_storage_permissions_.end()) return permissions->second; Send(new ViewHostMsg_AllowDOMStorage( - routing_id(), GURL(frame->securityOrigin().toString()), - GURL(frame->top()->securityOrigin().toString()), + routing_id(), GURL(frame->document().securityOrigin().toString()), + GURL(frame->top()->document().securityOrigin().toString()), local ? DOM_STORAGE_LOCAL : DOM_STORAGE_SESSION, &result)); cached_storage_permissions_[key] = result; diff --git a/chrome/renderer/external_extension.cc b/chrome/renderer/external_extension.cc index 6d54afc..a3bc2d7 100644 --- a/chrome/renderer/external_extension.cc +++ b/chrome/renderer/external_extension.cc @@ -9,6 +9,7 @@ #include "chrome/common/render_messages.h" #include "chrome/common/search_provider.h" #include "content/renderer/render_view.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "v8/include/v8.h" @@ -157,7 +158,10 @@ v8::Handle<v8::Value> ExternalExtensionWrapper::IsSearchProviderInstalled( GURL inquiry_url = GURL(name); if (!inquiry_url.is_empty()) { render_view->Send(new ViewHostMsg_GetSearchProviderInstallState( - render_view->routing_id(), webframe->url(), inquiry_url, &install)); + render_view->routing_id(), + webframe->document().url(), + inquiry_url, + &install)); } if (install == search_provider::DENIED) { diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc index 3d2f179..8736ea0 100644 --- a/chrome/renderer/page_load_histograms.cc +++ b/chrome/renderer/page_load_histograms.cc @@ -16,6 +16,7 @@ #include "content/renderer/navigation_state.h" #include "content/renderer/render_view.h" #include "googleurl/src/gurl.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPerformance.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" @@ -96,7 +97,8 @@ void PageLoadHistograms::Dump(WebFrame* frame) { return; // Only dump for supported schemes. - URLPattern::SchemeMasks scheme_type = GetSupportedSchemeType(frame->url()); + URLPattern::SchemeMasks scheme_type = + GetSupportedSchemeType(frame->document().url()); if (scheme_type == 0) return; diff --git a/chrome/renderer/safe_browsing/malware_dom_details.cc b/chrome/renderer/safe_browsing/malware_dom_details.cc index f2d96bd..866cae8 100644 --- a/chrome/renderer/safe_browsing/malware_dom_details.cc +++ b/chrome/renderer/safe_browsing/malware_dom_details.cc @@ -59,20 +59,19 @@ void MalwareDOMDetails::ExtractResources( NOTREACHED(); return; } - WebKit::WebFrame* cur_frame = web_view->mainFrame(); - for (; cur_frame; - cur_frame = cur_frame->traverseNext(false /* don't wrap around */)) { - DCHECK(cur_frame); - SafeBrowsingHostMsg_MalwareDOMDetails_Node frame_node; - frame_node.url = GURL(cur_frame->url()); - WebKit::WebDocument doc = cur_frame->document(); - if (doc.isNull()) { + WebKit::WebFrame* frame = web_view->mainFrame(); + for (; frame; frame = frame->traverseNext(false /* don't wrap */)) { + DCHECK(frame); + SafeBrowsingHostMsg_MalwareDOMDetails_Node details_node; + WebKit::WebDocument document = frame->document(); + details_node.url = GURL(document.url()); + if (document.isNull()) { // Nothing in this frame, move on to the next one. - resources->push_back(frame_node); + resources->push_back(details_node); continue; } - WebKit::WebNodeCollection elements = doc.all(); + WebKit::WebNodeCollection elements = document.all(); WebKit::WebNode cur_node = elements.firstItem(); for (; !cur_node.isNull(); cur_node = elements.nextItem()) { if (!cur_node.isElementNode()) { @@ -81,16 +80,16 @@ void MalwareDOMDetails::ExtractResources( WebKit::WebElement element = cur_node.to<WebKit::WebElement>(); if (element.hasTagName("iframe") || element.hasTagName("frame") || element.hasTagName("embed") || element.hasTagName("script")) { - HandleElement(element, &frame_node, resources); + HandleElement(element, &details_node, resources); if (resources->size() >= kMaxNodes) { // We have reached kMaxNodes, exit early. - resources->push_back(frame_node); + resources->push_back(details_node); return; } } } - resources->push_back(frame_node); + resources->push_back(details_node); } } diff --git a/chrome/renderer/safe_browsing/phishing_classifier.cc b/chrome/renderer/safe_browsing/phishing_classifier.cc index e64cfc3..f2323d1 100644 --- a/chrome/renderer/safe_browsing/phishing_classifier.cc +++ b/chrome/renderer/safe_browsing/phishing_classifier.cc @@ -24,6 +24,7 @@ #include "crypto/sha2.h" #include "googleurl/src/gurl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" @@ -105,7 +106,7 @@ void PhishingClassifier::BeginFeatureExtraction() { // Check whether the URL is one that we should classify. // Currently, we only classify http: URLs that are GET requests. - GURL url(frame->url()); + GURL url(frame->document().url()); if (!url.SchemeIs(chrome::kHttpScheme)) { RunFailureCallback(); return; @@ -171,7 +172,7 @@ void PhishingClassifier::TermExtractionFinished(bool success) { FeatureMap hashed_features; ClientPhishingRequest verdict; verdict.set_model_version(scorer_->model_version()); - verdict.set_url(main_frame->url().spec()); + verdict.set_url(main_frame->document().url().spec()); for (base::hash_map<std::string, double>::const_iterator it = features_->features().begin(); it != features_->features().end(); ++it) { diff --git a/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc b/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc index 814dab4..a276d5a 100644 --- a/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc +++ b/chrome/renderer/safe_browsing/phishing_classifier_delegate.cc @@ -19,6 +19,7 @@ #include "content/renderer/navigation_state.h" #include "content/renderer/render_thread.h" #include "content/renderer/render_view.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" @@ -207,7 +208,7 @@ void PhishingClassifierDelegate::ClassificationDone( } GURL PhishingClassifierDelegate::GetToplevelUrl() { - return render_view()->webview()->mainFrame()->url(); + return render_view()->webview()->mainFrame()->document().url(); } void PhishingClassifierDelegate::MaybeStartClassification() { diff --git a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc index e7f6d32..9b00045 100644 --- a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc +++ b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -391,7 +391,7 @@ bool PhishingDOMFeatureExtractor::ResetFrameData() { cur_frame_data_->elements = doc.all(); cur_frame_data_->domain = net::RegistryControlledDomainService::GetDomainAndRegistry( - cur_frame_->url()); + cur_frame_->document().url()); return true; } |