| OLD | NEW |
| 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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 &ChromeFrameAutomationClient::ProcessUrlRequestMessage), | 1033 &ChromeFrameAutomationClient::ProcessUrlRequestMessage), |
| 1034 base::Unretained(this), tab, msg, true)); | 1034 base::Unretained(this), tab, msg, true)); |
| 1035 return true; | 1035 return true; |
| 1036 } | 1036 } |
| 1037 | 1037 |
| 1038 void ChromeFrameAutomationClient::InitializeFieldTrials() { | 1038 void ChromeFrameAutomationClient::InitializeFieldTrials() { |
| 1039 static base::FieldTrial* trial = NULL; | 1039 static base::FieldTrial* trial = NULL; |
| 1040 if (!trial) { | 1040 if (!trial) { |
| 1041 // Do one-time initialization of the field trial here. | 1041 // Do one-time initialization of the field trial here. |
| 1042 // TODO(robertshield): End the field trial before March 7th 2013. | 1042 // TODO(robertshield): End the field trial before March 7th 2013. |
| 1043 scoped_refptr<base::FieldTrial> new_trial = new base::FieldTrial( | 1043 scoped_refptr<base::FieldTrial> new_trial = |
| 1044 "ChromeShutdownDelay", 1000, kWithDelayFieldTrialName, 2013, 3, 7); | 1044 base::FieldTrialList::GetFieldTrialInstance( |
| 1045 "ChromeShutdownDelay", 1000, kWithDelayFieldTrialName, NULL, |
| 1046 2013, 3, 7); |
| 1045 | 1047 |
| 1046 // Be consistent for this client. Note that this will only have an effect | 1048 // Be consistent for this client. Note that this will only have an effect |
| 1047 // once the client id is persisted. See http://crbug.com/117188 | 1049 // once the client id is persisted. See http://crbug.com/117188 |
| 1048 new_trial->UseOneTimeRandomization(); | 1050 new_trial->UseOneTimeRandomization(); |
| 1049 | 1051 |
| 1050 new_trial->AppendGroup(kNoDelayFieldTrialName, 500); // 50% without. | 1052 new_trial->AppendGroup(kNoDelayFieldTrialName, 500); // 50% without. |
| 1051 | 1053 |
| 1052 trial = new_trial.get(); | 1054 trial = new_trial.get(); |
| 1053 } | 1055 } |
| 1054 | 1056 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 const net::URLRequestStatus& status) { | 1332 const net::URLRequestStatus& status) { |
| 1331 automation_server_->Send(new AutomationMsg_RequestEnd( | 1333 automation_server_->Send(new AutomationMsg_RequestEnd( |
| 1332 tab_->handle(), request_id, status)); | 1334 tab_->handle(), request_id, status)); |
| 1333 } | 1335 } |
| 1334 | 1336 |
| 1335 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, | 1337 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, |
| 1336 const GURL& url, const std::string& cookie_string, int cookie_id) { | 1338 const GURL& url, const std::string& cookie_string, int cookie_id) { |
| 1337 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( | 1339 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( |
| 1338 tab_->handle(), success, url, cookie_string, cookie_id)); | 1340 tab_->handle(), success, url, cookie_string, cookie_id)); |
| 1339 } | 1341 } |
| OLD | NEW |