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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 956831386b133641428afd818ee075f0ba86cb72..eadd9c1cfd7ef75c8a03617fe5be68978d5028bc 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4,12 +4,15 @@
#include "content/browser/web_contents/web_contents_impl.h"
+#include <stddef.h>
+
#include <utility>
#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/metrics/histogram.h"
#include "base/process/process.h"
#include "base/profiler/scoped_tracker.h"
@@ -21,6 +24,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
#include "components/mime_util/mime_util.h"
#include "components/url_formatter/url_formatter.h"
#include "content/browser/accessibility/accessibility_mode_helper.h"
@@ -978,11 +982,11 @@ const base::string16& WebContentsImpl::GetTitle() const {
return page_title_when_no_navigation_entry_;
}
-int32 WebContentsImpl::GetMaxPageID() {
+int32_t WebContentsImpl::GetMaxPageID() {
return GetMaxPageIDForSiteInstance(GetSiteInstance());
}
-int32 WebContentsImpl::GetMaxPageIDForSiteInstance(
+int32_t WebContentsImpl::GetMaxPageIDForSiteInstance(
SiteInstance* site_instance) {
if (max_page_ids_.find(site_instance->GetId()) == max_page_ids_.end())
max_page_ids_[site_instance->GetId()] = -1;
@@ -990,12 +994,13 @@ int32 WebContentsImpl::GetMaxPageIDForSiteInstance(
return max_page_ids_[site_instance->GetId()];
}
-void WebContentsImpl::UpdateMaxPageID(int32 page_id) {
+void WebContentsImpl::UpdateMaxPageID(int32_t page_id) {
UpdateMaxPageIDForSiteInstance(GetSiteInstance(), page_id);
}
void WebContentsImpl::UpdateMaxPageIDForSiteInstance(
- SiteInstance* site_instance, int32 page_id) {
+ SiteInstance* site_instance,
+ int32_t page_id) {
if (GetMaxPageIDForSiteInstance(site_instance) < page_id)
max_page_ids_[site_instance->GetId()] = page_id;
}
@@ -1037,11 +1042,11 @@ const base::string16& WebContentsImpl::GetLoadStateHost() const {
return load_state_host_;
}
-uint64 WebContentsImpl::GetUploadSize() const {
+uint64_t WebContentsImpl::GetUploadSize() const {
return upload_size_;
}
-uint64 WebContentsImpl::GetUploadPosition() const {
+uint64_t WebContentsImpl::GetUploadPosition() const {
return upload_position_;
}
@@ -1905,19 +1910,19 @@ void WebContentsImpl::CreateNewWindow(
}
}
-void WebContentsImpl::CreateNewWidget(int32 render_process_id,
- int32 route_id,
+void WebContentsImpl::CreateNewWidget(int32_t render_process_id,
+ int32_t route_id,
blink::WebPopupType popup_type) {
CreateNewWidget(render_process_id, route_id, false, popup_type);
}
-void WebContentsImpl::CreateNewFullscreenWidget(int32 render_process_id,
- int32 route_id) {
+void WebContentsImpl::CreateNewFullscreenWidget(int32_t render_process_id,
+ int32_t route_id) {
CreateNewWidget(render_process_id, route_id, true, blink::WebPopupTypeNone);
}
-void WebContentsImpl::CreateNewWidget(int32 render_process_id,
- int32 route_id,
+void WebContentsImpl::CreateNewWidget(int32_t render_process_id,
+ int32_t route_id,
bool is_fullscreen,
blink::WebPopupType popup_type) {
RenderProcessHost* process = GetRenderProcessHost();
@@ -2561,7 +2566,7 @@ void WebContentsImpl::SaveFrameWithHeaders(const GURL& url,
BrowserContext::GetDownloadManager(GetBrowserContext());
if (!dlm)
return;
- int64 post_id = -1;
+ int64_t post_id = -1;
if (is_main_frame) {
const NavigationEntry* entry = controller_.GetLastCommittedEntry();
if (entry)
@@ -2592,7 +2597,7 @@ void WebContentsImpl::SaveFrameWithHeaders(const GURL& url,
void WebContentsImpl::GenerateMHTML(
const base::FilePath& file,
- const base::Callback<void(int64)>& callback) {
+ const base::Callback<void(int64_t)>& callback) {
MHTMLGenerationManager::GetInstance()->SaveMHTML(this, file, callback);
}
@@ -3940,7 +3945,7 @@ void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) {
}
void WebContentsImpl::UpdateState(RenderViewHost* rvh,
- int32 page_id,
+ int32_t page_id,
const PageState& page_state) {
DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries());
@@ -4166,7 +4171,7 @@ void WebContentsImpl::UpdateStateForFrame(RenderFrameHost* render_frame_host,
}
void WebContentsImpl::UpdateTitle(RenderFrameHost* render_frame_host,
- int32 page_id,
+ int32_t page_id,
const base::string16& title,
base::i18n::TextDirection title_direction) {
// If we have a title, that's a pretty good indication that we've started
@@ -4263,9 +4268,9 @@ void WebContentsImpl::EnsureOpenerProxiesExist(RenderFrameHost* source_rfh) {
}
}
-bool WebContentsImpl::AddMessageToConsole(int32 level,
+bool WebContentsImpl::AddMessageToConsole(int32_t level,
const base::string16& message,
- int32 line_no,
+ int32_t line_no,
const base::string16& source_id) {
if (!delegate_)
return false;
@@ -4366,8 +4371,8 @@ void WebContentsImpl::RendererResponsive(
void WebContentsImpl::LoadStateChanged(
const GURL& url,
const net::LoadStateWithParam& load_state,
- uint64 upload_position,
- uint64 upload_size) {
+ uint64_t upload_position,
+ uint64_t upload_size) {
// TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285
// is fixed.
tracked_objects::ScopedTracker tracking_profile1(
@@ -4497,7 +4502,7 @@ bool WebContentsImpl::CreateRenderViewForRenderManager(
// Make sure we use the correct starting page_id in the new RenderView.
UpdateMaxPageIDIfNecessary(render_view_host);
- int32 max_page_id =
+ int32_t max_page_id =
GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance());
if (!static_cast<RenderViewHostImpl*>(render_view_host)
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698