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

Side by Side Diff: chrome_frame/chrome_frame_automation.cc

Issue 9705074: Supporting command line argument to force field trials (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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
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_frame/chrome_frame_automation.h" 5 #include "chrome_frame/chrome_frame_automation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 &ChromeFrameAutomationClient::ProcessUrlRequestMessage), 1027 &ChromeFrameAutomationClient::ProcessUrlRequestMessage),
1028 base::Unretained(this), tab, msg, true)); 1028 base::Unretained(this), tab, msg, true));
1029 return true; 1029 return true;
1030 } 1030 }
1031 1031
1032 void ChromeFrameAutomationClient::InitializeFieldTrials() { 1032 void ChromeFrameAutomationClient::InitializeFieldTrials() {
1033 static base::FieldTrial* trial = NULL; 1033 static base::FieldTrial* trial = NULL;
1034 if (!trial) { 1034 if (!trial) {
1035 // Do one-time initialization of the field trial here. 1035 // Do one-time initialization of the field trial here.
1036 // TODO(robertshield): End the field trial before March 7th 2013. 1036 // TODO(robertshield): End the field trial before March 7th 2013.
1037 scoped_refptr<base::FieldTrial> new_trial = new base::FieldTrial( 1037 scoped_refptr<base::FieldTrial> new_trial =
1038 "ChromeShutdownDelay", 1000, kWithDelayFieldTrialName, 2013, 3, 7); 1038 base::FieldTrial::CreateInstance("ChromeShutdownDelay", 1000,
1039 kWithDelayFieldTrialName, 2013, 3, 7);
1039 1040
1040 // Be consistent for this client. Note that this will only have an effect 1041 // Be consistent for this client. Note that this will only have an effect
1041 // once the client id is persisted. See http://crbug.com/117188 1042 // once the client id is persisted. See http://crbug.com/117188
1042 new_trial->UseOneTimeRandomization(); 1043 new_trial->UseOneTimeRandomization();
1043 1044
1044 new_trial->AppendGroup(kNoDelayFieldTrialName, 500); // 50% without. 1045 new_trial->AppendGroup(kNoDelayFieldTrialName, 500); // 50% without.
1045 1046
1046 trial = new_trial.get(); 1047 trial = new_trial.get();
1047 } 1048 }
1048 1049
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 const net::URLRequestStatus& status) { 1325 const net::URLRequestStatus& status) {
1325 automation_server_->Send(new AutomationMsg_RequestEnd( 1326 automation_server_->Send(new AutomationMsg_RequestEnd(
1326 tab_->handle(), request_id, status)); 1327 tab_->handle(), request_id, status));
1327 } 1328 }
1328 1329
1329 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, 1330 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success,
1330 const GURL& url, const std::string& cookie_string, int cookie_id) { 1331 const GURL& url, const std::string& cookie_string, int cookie_id) {
1331 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( 1332 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse(
1332 tab_->handle(), success, url, cookie_string, cookie_id)); 1333 tab_->handle(), success, url, cookie_string, cookie_id));
1333 } 1334 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698