Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / android_webview / browser / renderer_host / aw_resource_dispatcher_host_delegate.cc
index f55b36a..56d06e1 100644 (file)
@@ -42,7 +42,7 @@ void SetCacheControlFlag(
       net::LOAD_VALIDATE_CACHE |
       net::LOAD_PREFERRING_CACHE |
       net::LOAD_ONLY_FROM_CACHE;
-  DCHECK((flag & all_cache_control_flags) == flag);
+  DCHECK_EQ((flag & all_cache_control_flags), flag);
   int load_flags = request->load_flags();
   load_flags &= ~all_cache_control_flags;
   load_flags |= flag;
@@ -212,8 +212,6 @@ void AwResourceDispatcherHostDelegate::RequestBeginning(
     content::ResourceContext* resource_context,
     content::AppCacheService* appcache_service,
     ResourceType resource_type,
-    int child_id,
-    int route_id,
     ScopedVector<content::ResourceThrottle>* throttles) {
 
   AddExtraHeadersIfNeeded(request, resource_context);
@@ -227,7 +225,7 @@ void AwResourceDispatcherHostDelegate::RequestBeginning(
   // however io_client may or may not be ready at the time depending on whether
   // webcontents is created.
   throttles->push_back(new IoThreadClientThrottle(
-      child_id, request_info->GetRenderFrameID(), request));
+      request_info->GetChildID(), request_info->GetRenderFrameID(), request));
 
   // We allow intercepting only navigations within main frames. This
   // is used to post onPageStarted. We handle shouldOverrideUrlLoading
@@ -408,13 +406,13 @@ void AwResourceDispatcherHostDelegate::AddExtraHeadersIfNeeded(
   if (request_info->GetResourceType() != content::RESOURCE_TYPE_MAIN_FRAME)
     return;
 
-  const content::PageTransition transition = request_info->GetPageTransition();
+  const ui::PageTransition transition = request_info->GetPageTransition();
   const bool is_load_url =
-      transition & content::PAGE_TRANSITION_FROM_API;
+      transition & ui::PAGE_TRANSITION_FROM_API;
   const bool is_go_back_forward =
-      transition & content::PAGE_TRANSITION_FORWARD_BACK;
-  const bool is_reload = content::PageTransitionCoreTypeIs(
-      transition, content::PAGE_TRANSITION_RELOAD);
+      transition & ui::PAGE_TRANSITION_FORWARD_BACK;
+  const bool is_reload = ui::PageTransitionCoreTypeIs(
+      transition, ui::PAGE_TRANSITION_RELOAD);
   if (is_load_url || is_go_back_forward || is_reload) {
     AwResourceContext* awrc = static_cast<AwResourceContext*>(resource_context);
     std::string extra_headers = awrc->GetExtraHeaders(request->url());