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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2531133002: Convert SetIsIncognitoProcess to use mojo. (Closed)
Patch Set: Convert SetIsIncognitoProcess to use mojo. Created 4 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
« no previous file with comments | « no previous file | chrome/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 2cab771dcbe9857263ba97ea71a87b5e9eea2297..db1a6605714d10fdcb7329ccfe4d04677357cbc4 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -108,6 +108,7 @@
#include "chrome/common/pepper_permission_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
+#include "chrome/common/renderer.mojom.h"
#include "chrome/common/secure_origin_whitelist.h"
#include "chrome/common/stack_sampling_configuration.h"
#include "chrome/common/url_constants.h"
@@ -1078,8 +1079,11 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
host->AddFilter(new cdm::CdmMessageFilterAndroid());
#endif
- host->Send(new ChromeViewMsg_SetIsIncognitoProcess(
- profile->IsOffTheRecord()));
+ bool is_incognito_process = profile->IsOffTheRecord();
+
+ chrome::mojom::RendererAssociatedPtr renderer_interface;
+ host->GetChannel()->GetRemoteAssociatedInterface(&renderer_interface);
+ renderer_interface->SetInitialConfiguration(is_incognito_process);
for (size_t i = 0; i < extra_parts_.size(); ++i)
extra_parts_[i]->RenderProcessWillLaunch(host);
@@ -1095,6 +1099,8 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
GetRendererContentSettingRules(
HostContentSettingsMapFactory::GetForProfile(profile), &rules);
}
+ // TODO(nigeltao): eliminate this legacy IPC. Instead, add an extra arg to
+ // the renderer_interface->SetInitialConfiguration call.
host->Send(new ChromeViewMsg_SetContentSettingRules(rules));
}
« no previous file with comments | « no previous file | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698