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

Side by Side Diff: chrome/browser/external_tab_container_win.cc

Issue 8806011: Make NavigationEntry and friends use content::Referrer instead of plain URLs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/net/gaia/gaia_oauth_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/external_tab_container_win.h" 5 #include "chrome/browser/external_tab_container_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 NavigationEntry* entry = tab_contents_->controller().GetActiveEntry(); 941 NavigationEntry* entry = tab_contents_->controller().GetActiveEntry();
942 // If this is very early in the game then we may not have an entry. 942 // If this is very early in the game then we may not have an entry.
943 if (!entry) 943 if (!entry)
944 return false; 944 return false;
945 945
946 nav_info->navigation_type = nav_type; 946 nav_info->navigation_type = nav_type;
947 nav_info->relative_offset = relative_offset; 947 nav_info->relative_offset = relative_offset;
948 nav_info->navigation_index = 948 nav_info->navigation_index =
949 tab_contents_->controller().GetCurrentEntryIndex(); 949 tab_contents_->controller().GetCurrentEntryIndex();
950 nav_info->url = entry->url(); 950 nav_info->url = entry->url();
951 nav_info->referrer = entry->referrer(); 951 nav_info->referrer = entry->referrer().url;
952 nav_info->title = UTF16ToWideHack(entry->title()); 952 nav_info->title = UTF16ToWideHack(entry->title());
953 if (nav_info->title.empty()) 953 if (nav_info->title.empty())
954 nav_info->title = UTF8ToWide(nav_info->url.spec()); 954 nav_info->title = UTF8ToWide(nav_info->url.spec());
955 955
956 nav_info->security_style = entry->ssl().security_style(); 956 nav_info->security_style = entry->ssl().security_style();
957 nav_info->displayed_insecure_content = 957 nav_info->displayed_insecure_content =
958 entry->ssl().displayed_insecure_content(); 958 entry->ssl().displayed_insecure_content();
959 nav_info->ran_insecure_content = entry->ssl().ran_insecure_content(); 959 nav_info->ran_insecure_content = entry->ssl().ran_insecure_content();
960 return true; 960 return true;
961 } 961 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 if (params.disposition == CURRENT_TAB) { 1171 if (params.disposition == CURRENT_TAB) {
1172 DCHECK(route_all_top_level_navigations_); 1172 DCHECK(route_all_top_level_navigations_);
1173 forward_params.disposition = NEW_FOREGROUND_TAB; 1173 forward_params.disposition = NEW_FOREGROUND_TAB;
1174 } 1174 }
1175 TabContents* new_contents = 1175 TabContents* new_contents =
1176 ExternalTabContainer::OpenURLFromTab(source, forward_params); 1176 ExternalTabContainer::OpenURLFromTab(source, forward_params);
1177 // support only one navigation for a dummy tab before it is killed. 1177 // support only one navigation for a dummy tab before it is killed.
1178 ::DestroyWindow(GetNativeView()); 1178 ::DestroyWindow(GetNativeView());
1179 return new_contents; 1179 return new_contents;
1180 } 1180 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/gaia/gaia_oauth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698