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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 293123010: Add a field trial to disable deferred committing of cookie changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 content::RenderProcessHost* process_host) { 1220 content::RenderProcessHost* process_host) {
1221 // If there is currently a prerender in progress for the host provided, 1221 // If there is currently a prerender in progress for the host provided,
1222 // it may not be shared. We require prerenders to be by themselves in a 1222 // it may not be shared. We require prerenders to be by themselves in a
1223 // separate process, so that we can monitor their resource usage, and so that 1223 // separate process, so that we can monitor their resource usage, and so that
1224 // we can track the cookies that they change. 1224 // we can track the cookies that they change.
1225 Profile* profile = Profile::FromBrowserContext( 1225 Profile* profile = Profile::FromBrowserContext(
1226 process_host->GetBrowserContext()); 1226 process_host->GetBrowserContext());
1227 prerender::PrerenderManager* prerender_manager = 1227 prerender::PrerenderManager* prerender_manager =
1228 prerender::PrerenderManagerFactory::GetForProfile(profile); 1228 prerender::PrerenderManagerFactory::GetForProfile(profile);
1229 if (prerender_manager && 1229 if (prerender_manager &&
1230 prerender_manager->IsProcessPrerendering(process_host)) { 1230 !prerender_manager->MayReuseProcessHost(process_host)) {
1231 return false; 1231 return false;
1232 } 1232 }
1233 1233
1234 return true; 1234 return true;
1235 } 1235 }
1236 1236
1237 // This function is trying to limit the amount of processes used by extensions 1237 // This function is trying to limit the amount of processes used by extensions
1238 // with background pages. It uses a globally set percentage of processes to 1238 // with background pages. It uses a globally set percentage of processes to
1239 // run such extensions and if the limit is exceeded, it returns true, to 1239 // run such extensions and if the limit is exceeded, it returns true, to
1240 // indicate to the content module to group extensions together. 1240 // indicate to the content module to group extensions together.
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
2749 switches::kDisableWebRtcEncryption, 2749 switches::kDisableWebRtcEncryption,
2750 }; 2750 };
2751 to_command_line->CopySwitchesFrom(from_command_line, 2751 to_command_line->CopySwitchesFrom(from_command_line,
2752 kWebRtcDevSwitchNames, 2752 kWebRtcDevSwitchNames,
2753 arraysize(kWebRtcDevSwitchNames)); 2753 arraysize(kWebRtcDevSwitchNames));
2754 } 2754 }
2755 } 2755 }
2756 #endif // defined(ENABLE_WEBRTC) 2756 #endif // defined(ENABLE_WEBRTC)
2757 2757
2758 } // namespace chrome 2758 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698