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

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

Issue 12877: Fix a comment. This was brought up by Ojan in a review for my previous patch,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/web_contents.h" 5 #include "chrome/browser/web_contents.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_version_info.h" 9 #include "base/file_version_info.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 769
770 int entry_index = controller()->GetEntryIndexWithPageID( 770 int entry_index = controller()->GetEntryIndexWithPageID(
771 type(), GetSiteInstance(), page_id); 771 type(), GetSiteInstance(), page_id);
772 if (entry_index < 0) 772 if (entry_index < 0)
773 return; 773 return;
774 NavigationEntry* entry = controller()->GetEntryAtIndex(entry_index); 774 NavigationEntry* entry = controller()->GetEntryAtIndex(entry_index);
775 775
776 if (state == entry->content_state()) 776 if (state == entry->content_state())
777 return; // Nothing to update. 777 return; // Nothing to update.
778 entry->set_content_state(state); 778 entry->set_content_state(state);
779
780 // Notify everybody of the changes (only when the current page changed).
781 controller()->NotifyEntryChanged(entry, entry_index); 779 controller()->NotifyEntryChanged(entry, entry_index);
782 } 780 }
783 781
784 void WebContents::UpdateTitle(RenderViewHost* rvh, 782 void WebContents::UpdateTitle(RenderViewHost* rvh,
785 int32 page_id, const std::wstring& title) { 783 int32 page_id, const std::wstring& title) {
786 if (!controller()) 784 if (!controller())
787 return; 785 return;
788 786
789 // If we have a title, that's a pretty good indication that we've started 787 // If we have a title, that's a pretty good indication that we've started
790 // getting useful data. 788 // getting useful data.
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 // The favicon url isn't valid. This means there really isn't a favicon, 1823 // The favicon url isn't valid. This means there really isn't a favicon,
1826 // or the favicon url wasn't obtained before the load started. This assumes 1824 // or the favicon url wasn't obtained before the load started. This assumes
1827 // the later. 1825 // the later.
1828 // TODO(sky): Need a way to set the favicon that doesn't involve generating 1826 // TODO(sky): Need a way to set the favicon that doesn't involve generating
1829 // its url. 1827 // its url.
1830 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer)); 1828 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer));
1831 } 1829 }
1832 new_url->set_safe_for_autoreplace(true); 1830 new_url->set_safe_for_autoreplace(true);
1833 url_model->Add(new_url); 1831 url_model->Add(new_url);
1834 } 1832 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698