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

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

Issue 15950011: content: Move kViewSourceScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/navigation_entry_impl.h" 5 #include "content/browser/web_contents/navigation_entry_impl.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/public/common/content_constants.h" 10 #include "content/public/common/content_constants.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 string16::size_type slashpos = title.rfind('/'); 187 string16::size_type slashpos = title.rfind('/');
188 if (slashpos != string16::npos) 188 if (slashpos != string16::npos)
189 title = title.substr(slashpos + 1); 189 title = title.substr(slashpos + 1);
190 } 190 }
191 191
192 ui::ElideString(title, kMaxTitleChars, &cached_display_title_); 192 ui::ElideString(title, kMaxTitleChars, &cached_display_title_);
193 return cached_display_title_; 193 return cached_display_title_;
194 } 194 }
195 195
196 bool NavigationEntryImpl::IsViewSourceMode() const { 196 bool NavigationEntryImpl::IsViewSourceMode() const {
197 return virtual_url_.SchemeIs(chrome::kViewSourceScheme); 197 return virtual_url_.SchemeIs(kViewSourceScheme);
198 } 198 }
199 199
200 void NavigationEntryImpl::SetTransitionType( 200 void NavigationEntryImpl::SetTransitionType(
201 PageTransition transition_type) { 201 PageTransition transition_type) {
202 transition_type_ = transition_type; 202 transition_type_ = transition_type;
203 } 203 }
204 204
205 PageTransition NavigationEntryImpl::GetTransitionType() const { 205 PageTransition NavigationEntryImpl::GetTransitionType() const {
206 return transition_type_; 206 return transition_type_;
207 } 207 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 313
314 void NavigationEntryImpl::SetScreenshotPNGData( 314 void NavigationEntryImpl::SetScreenshotPNGData(
315 scoped_refptr<base::RefCountedBytes> png_data) { 315 scoped_refptr<base::RefCountedBytes> png_data) {
316 screenshot_ = png_data; 316 screenshot_ = png_data;
317 if (screenshot_) 317 if (screenshot_)
318 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size()); 318 UMA_HISTOGRAM_MEMORY_KB("Overscroll.ScreenshotSize", screenshot_->size());
319 } 319 }
320 320
321 } // namespace content 321 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_manager_browsertest.cc ('k') | content/public/browser/web_contents_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698