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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 121033002: Update uses of UTF conversions in content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 2691 matching lines...) Expand 10 before | Expand all | Expand 10 after
2702 } 2702 }
2703 2703
2704 bool WebContentsImpl::UpdateTitleForEntry(NavigationEntryImpl* entry, 2704 bool WebContentsImpl::UpdateTitleForEntry(NavigationEntryImpl* entry,
2705 const base::string16& title) { 2705 const base::string16& title) {
2706 // For file URLs without a title, use the pathname instead. In the case of a 2706 // For file URLs without a title, use the pathname instead. In the case of a
2707 // synthesized title, we don't want the update to count toward the "one set 2707 // synthesized title, we don't want the update to count toward the "one set
2708 // per page of the title to history." 2708 // per page of the title to history."
2709 base::string16 final_title; 2709 base::string16 final_title;
2710 bool explicit_set; 2710 bool explicit_set;
2711 if (entry && entry->GetURL().SchemeIsFile() && title.empty()) { 2711 if (entry && entry->GetURL().SchemeIsFile() && title.empty()) {
2712 final_title = UTF8ToUTF16(entry->GetURL().ExtractFileName()); 2712 final_title = base::UTF8ToUTF16(entry->GetURL().ExtractFileName());
2713 explicit_set = false; // Don't count synthetic titles toward the set limit. 2713 explicit_set = false; // Don't count synthetic titles toward the set limit.
2714 } else { 2714 } else {
2715 TrimWhitespace(title, TRIM_ALL, &final_title); 2715 TrimWhitespace(title, TRIM_ALL, &final_title);
2716 explicit_set = true; 2716 explicit_set = true;
2717 } 2717 }
2718 2718
2719 // If a page is created via window.open and never navigated, 2719 // If a page is created via window.open and never navigated,
2720 // there will be no navigation entry. In this situation, 2720 // there will be no navigation entry. In this situation,
2721 // |page_title_when_no_navigation_entry_| will be used for page title. 2721 // |page_title_when_no_navigation_entry_| will be used for page title.
2722 if (entry) { 2722 if (entry) {
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
3824 } 3824 }
3825 3825
3826 void WebContentsImpl::OnFrameRemoved( 3826 void WebContentsImpl::OnFrameRemoved(
3827 RenderViewHostImpl* render_view_host, 3827 RenderViewHostImpl* render_view_host,
3828 int64 frame_id) { 3828 int64 frame_id) {
3829 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3829 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3830 FrameDetached(render_view_host, frame_id)); 3830 FrameDetached(render_view_host, frame_id));
3831 } 3831 }
3832 3832
3833 } // namespace content 3833 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_drag_win.cc ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698