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/browser/ui/bookmarks/bookmark_prompt_controller.h" | 5 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 if (!date_range) | 224 if (!date_range) |
225 return false; | 225 return false; |
226 | 226 |
227 scoped_refptr<base::FieldTrial> trial( | 227 scoped_refptr<base::FieldTrial> trial( |
228 base::FieldTrialList::FactoryGetFieldTrial( | 228 base::FieldTrialList::FactoryGetFieldTrial( |
229 kBookmarkPromptTrialName, 100, kBookmarkPromptDefaultGroup, | 229 kBookmarkPromptTrialName, 100, kBookmarkPromptDefaultGroup, |
230 date_range->expiration_date.year, | 230 date_range->expiration_date.year, |
231 date_range->expiration_date.month, | 231 date_range->expiration_date.month, |
232 date_range->expiration_date.day_of_month, NULL)); | 232 date_range->expiration_date.day_of_month, NULL)); |
233 trial->UseOneTimeRandomization(); | 233 trial->UseOneTimeRandomization(); |
234 trial->AppendGroup(kBookmarkPromptControlGroup, 99); | 234 trial->AppendGroup(kBookmarkPromptControlGroup, 10); |
235 trial->AppendGroup(kBookmarkPromptExperimentGroup, 1); | 235 trial->AppendGroup(kBookmarkPromptExperimentGroup, 10); |
236 | 236 |
237 chrome_variations::AssociateGoogleVariationID( | 237 chrome_variations::AssociateGoogleVariationID( |
238 chrome_variations::GOOGLE_UPDATE_SERVICE, | 238 chrome_variations::GOOGLE_UPDATE_SERVICE, |
239 kBookmarkPromptTrialName, kBookmarkPromptDefaultGroup, | 239 kBookmarkPromptTrialName, kBookmarkPromptDefaultGroup, |
240 chrome_variations::BOOKMARK_PROMPT_TRIAL_DEFAULT); | 240 chrome_variations::BOOKMARK_PROMPT_TRIAL_DEFAULT); |
241 chrome_variations::AssociateGoogleVariationID( | 241 chrome_variations::AssociateGoogleVariationID( |
242 chrome_variations::GOOGLE_UPDATE_SERVICE, | 242 chrome_variations::GOOGLE_UPDATE_SERVICE, |
243 kBookmarkPromptTrialName, kBookmarkPromptControlGroup, | 243 kBookmarkPromptTrialName, kBookmarkPromptControlGroup, |
244 chrome_variations::BOOKMARK_PROMPT_TRIAL_CONTROL); | 244 chrome_variations::BOOKMARK_PROMPT_TRIAL_CONTROL); |
245 chrome_variations::AssociateGoogleVariationID( | 245 chrome_variations::AssociateGoogleVariationID( |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 registrar_.Remove( | 387 registrar_.Remove( |
388 this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, | 388 this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, |
389 content::Source<WebContents>(web_contents_)); | 389 content::Source<WebContents>(web_contents_)); |
390 } | 390 } |
391 web_contents_ = web_contents; | 391 web_contents_ = web_contents; |
392 if (web_contents_) { | 392 if (web_contents_) { |
393 registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, | 393 registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, |
394 content::Source<WebContents>(web_contents_)); | 394 content::Source<WebContents>(web_contents_)); |
395 } | 395 } |
396 } | 396 } |
OLD | NEW |