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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 7638: Construct a field trial to see if HIGH or MEDIUM memory model "works better"... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/browser_trial.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
===================================================================
--- chrome/browser/browser_process_impl.cc (revision 3603)
+++ chrome/browser/browser_process_impl.cc (working copy)
@@ -5,9 +5,10 @@
#include "chrome/browser/browser_process_impl.h"
#include "base/command_line.h"
+#include "base/path_service.h"
#include "base/thread.h"
-#include "base/path_service.h"
#include "chrome/browser/automation/automation_provider_list.h"
+#include "chrome/browser/browser_trial.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/download/download_file.h"
#include "chrome/browser/download/save_file_manager.h"
@@ -115,6 +116,16 @@
else if (model == L"medium")
memory_model_ = MEDIUM_MEMORY_MODEL;
}
+ } else {
+ // Randomly choose what memory model to use.
+ const double probability = 0.5;
+ FieldTrial* trial(new FieldTrial(BrowserTrial::kMemoryModelFieldTrial,
+ probability));
+ DCHECK(FieldTrialList::Find(BrowserTrial::kMemoryModelFieldTrial) == trial);
+ if (trial->boolean_value())
+ memory_model_ = HIGH_MEMORY_MODEL;
+ else
+ memory_model_ = MEDIUM_MEMORY_MODEL;
}
suspend_controller_ = new SuspendController();
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/browser_trial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698