Index: chrome/browser/webdata/autocomplete_syncable_service.cc |
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.cc b/chrome/browser/webdata/autocomplete_syncable_service.cc |
index a28668af123d36d4377a051f33cd9fbbf45acc34..21f912bf153ceaeb334bf639ea77cb46c565e902 100644 |
--- a/chrome/browser/webdata/autocomplete_syncable_service.cc |
+++ b/chrome/browser/webdata/autocomplete_syncable_service.cc |
@@ -13,6 +13,7 @@ |
#include "chrome/browser/webdata/web_data_service.h" |
#include "chrome/browser/webdata/web_database.h" |
#include "chrome/common/chrome_notification_types.h" |
+#include "chrome/common/chrome_version_info.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/notification_service.h" |
#include "net/base/escape.h" |
@@ -81,9 +82,18 @@ bool MergeTimestamps(const sync_pb::AutofillSpecifics& autofill, |
} |
bool ShouldCullSyncedData() { |
+ chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
+ |
// To set probability to 10% - set it to 0.1, 5% to 0.05, etc. |
- static double kCullingProbability = 0.0; |
- return (base::RandDouble() < kCullingProbability); |
+ double culling_probability; |
tim (not reviewing)
2012/11/02 17:46:11
It's best to initialize (to 0, I suppose).
Ilya Sherman
2012/11/02 23:12:34
Done.
|
+ if (channel == chrome::VersionInfo::CHANNEL_CANARY) |
+ culling_probability = 1.0; |
+ else if (channel == chrome::VersionInfo::CHANNEL_DEV) |
+ culling_probability = 0.2; |
+ else |
+ culling_probability = 0.0; |
+ |
+ return (base::RandDouble() < culling_probability); |
} |
} // namespace |