File tree Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Expand file tree Collapse file tree 4 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -225,9 +225,9 @@ void Shell::Reload(ReloadType type) {
225
225
case RELOAD_DEV:
226
226
// ShellContentBrowserClient always tries to use the existing
227
227
// process so we need to overwrite it here
228
- browser_context->set_pending_devreload ( true );
228
+ browser_context->set_pinning_renderer ( false );
229
229
web_contents_->GetController ().ReloadDev (false );
230
- browser_context->set_pending_devreload ( false );
230
+ browser_context->set_pinning_renderer ( true );
231
231
break ;
232
232
}
233
233
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ namespace content {
44
44
45
45
ShellBrowserContext::ShellBrowserContext (bool off_the_record,
46
46
nw::Package* package)
47
- : is_pending_devreload_ (false ),
47
+ : disable_pinning_renderer_ (false ),
48
48
off_the_record_ (off_the_record),
49
49
package_(package) {
50
50
InitWhileIOAllowed ();
Original file line number Diff line number Diff line change @@ -52,14 +52,16 @@ class ShellBrowserContext : public BrowserContext {
52
52
GetSpeechRecognitionPreferences () OVERRIDE;
53
53
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy () OVERRIDE;
54
54
55
- bool pending_devreload () { return is_pending_devreload_ ; }
56
- void set_pending_devreload (bool val) { is_pending_devreload_ = val; }
55
+ bool pinning_renderer () { return !disable_pinning_renderer_ ; }
56
+ void set_pinning_renderer (bool val) { disable_pinning_renderer_ = ! val; }
57
57
private:
58
58
// Performs initialization of the ShellBrowserContext while IO is still
59
59
// allowed on the current thread.
60
60
void InitWhileIOAllowed ();
61
61
62
- bool is_pending_devreload_; // whether dev reload is in process
62
+ bool disable_pinning_renderer_; // whether dev reload is in process
63
+ // or we want to disable pinning
64
+ // temporarily
63
65
bool off_the_record_;
64
66
nw::Package* package_;
65
67
ScopedTempDir testing_path_;
Original file line number Diff line number Diff line change @@ -181,10 +181,10 @@ bool ShellContentBrowserClient::ShouldTryToUseExistingProcessHost(
181
181
BrowserContext* browser_context, const GURL& url) {
182
182
ShellBrowserContext* shell_browser_context =
183
183
static_cast <ShellBrowserContext*>(browser_context);
184
- if (shell_browser_context->pending_devreload ())
185
- return false ;
186
- else
184
+ if (shell_browser_context->pinning_renderer ())
187
185
return true ;
186
+ else
187
+ return false ;
188
188
}
189
189
190
190
bool ShellContentBrowserClient::IsSuitableHost (RenderProcessHost* process_host,
You can’t perform that action at this time.
0 commit comments