I am having some conceptual difficulties here that I am unable to resolve by walking through the code in debugger.
When I run resource_manager example it behaves as described above.
However, if in debugger I skip over the code to add BinaryResourceProvider
( adding only the DumpResourceProvider) I also end up hitting
https://examples.com website.
- Code: Select all
// Add example Providers to the CefResourceManager.
void SetupResourceManager(CefRefPtr<CefResourceManager> resource_manager) {
if (!CefCurrentlyOn(TID_IO)) {
// Execute on the browser IO thread.
CefPostTask(TID_IO, base::Bind(SetupResourceManager, resource_manager));
return;
}
const std::string& test_origin = shared::kTestOrigin;
// Add the Provider for dumping request contents.
resource_manager->AddProvider(
new RequestDumpResourceProvider(test_origin + "request.html"), 0,
std::string());
// Add the Provider for bundled resource files.
#if defined(OS_WIN)
// Read BINARY resources from the executable. // !!!! I don't execute this code via moving the next step in debugger !!!
resource_manager->AddProvider(
shared::CreateBinaryResourceProvider(test_origin), 100, std::string());
But that is exactly what I want to do in my separate app. I don't care about serving any binary resources embedded in my app. I only want to intercept and modify the response from the
specific fake URL, so that I can return the response that I want, in my case coming from the local file system, not from embedded resources.
Do I absolutely need to add binary resource provider on top of dump resource provider?
What am I missing?