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

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 1706603004: Replace web_cache_messages.h with Mojo service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 4 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/guest_view/web_view/web_view_guest.h" 5 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 740
741 if (!partition) 741 if (!partition)
742 return false; 742 return false;
743 743
744 if (removal_mask & webview::WEB_VIEW_REMOVE_DATA_MASK_CACHE) { 744 if (removal_mask & webview::WEB_VIEW_REMOVE_DATA_MASK_CACHE) {
745 // First clear http cache data and then clear the rest in 745 // First clear http cache data and then clear the rest in
746 // |ClearDataInternal|. 746 // |ClearDataInternal|.
747 int render_process_id = web_contents()->GetRenderProcessHost()->GetID(); 747 int render_process_id = web_contents()->GetRenderProcessHost()->GetID();
748 // We need to clear renderer cache separately for our process because 748 // We need to clear renderer cache separately for our process because
749 // StoragePartitionHttpCacheDataRemover::ClearData() does not clear that. 749 // StoragePartitionHttpCacheDataRemover::ClearData() does not clear that.
750 web_cache::WebCacheManager::GetInstance()->Remove(render_process_id);
751 web_cache::WebCacheManager::GetInstance()->ClearCacheForProcess( 750 web_cache::WebCacheManager::GetInstance()->ClearCacheForProcess(
752 render_process_id); 751 render_process_id);
752 web_cache::WebCacheManager::GetInstance()->Remove(render_process_id);
753 753
754 base::Closure cache_removal_done_callback = base::Bind( 754 base::Closure cache_removal_done_callback = base::Bind(
755 &WebViewGuest::ClearDataInternal, weak_ptr_factory_.GetWeakPtr(), 755 &WebViewGuest::ClearDataInternal, weak_ptr_factory_.GetWeakPtr(),
756 remove_since, removal_mask, callback); 756 remove_since, removal_mask, callback);
757 // StoragePartitionHttpCacheDataRemover removes itself when it is done. 757 // StoragePartitionHttpCacheDataRemover removes itself when it is done.
758 // components/, move |ClearCache| to WebViewGuest: http//crbug.com/471287. 758 // components/, move |ClearCache| to WebViewGuest: http//crbug.com/471287.
759 browsing_data::StoragePartitionHttpCacheDataRemover::CreateForRange( 759 browsing_data::StoragePartitionHttpCacheDataRemover::CreateForRange(
760 partition, remove_since, base::Time::Now()) 760 partition, remove_since, base::Time::Now())
761 ->Remove(cache_removal_done_callback); 761 ->Remove(cache_removal_done_callback);
762 762
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); 1497 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue());
1498 DispatchEventToView(make_scoped_ptr( 1498 DispatchEventToView(make_scoped_ptr(
1499 new GuestViewEvent(webview::kEventExitFullscreen, std::move(args)))); 1499 new GuestViewEvent(webview::kEventExitFullscreen, std::move(args))));
1500 } 1500 }
1501 // Since we changed fullscreen state, sending a Resize message ensures that 1501 // Since we changed fullscreen state, sending a Resize message ensures that
1502 // renderer/ sees the change. 1502 // renderer/ sees the change.
1503 web_contents()->GetRenderViewHost()->GetWidget()->WasResized(); 1503 web_contents()->GetRenderViewHost()->GetWidget()->WasResized();
1504 } 1504 }
1505 1505
1506 } // namespace extensions 1506 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698