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

Side by Side Diff: chrome/browser/metrics/variations_service.cc

Issue 10693114: Add iOS to the variations study proto. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: merge to tot Created 8 years, 5 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/browser/metrics/variations_service.h" 5 #include "chrome/browser/metrics/variations_service.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/build_time.h" 10 #include "base/build_time.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 Study_Platform GetCurrentPlatform() { 61 Study_Platform GetCurrentPlatform() {
62 #if defined(OS_WIN) 62 #if defined(OS_WIN)
63 return Study_Platform_PLATFORM_WINDOWS; 63 return Study_Platform_PLATFORM_WINDOWS;
64 #elif defined(OS_MACOSX) 64 #elif defined(OS_MACOSX)
65 return Study_Platform_PLATFORM_MAC; 65 return Study_Platform_PLATFORM_MAC;
66 #elif defined(OS_CHROMEOS) 66 #elif defined(OS_CHROMEOS)
67 return Study_Platform_PLATFORM_CHROMEOS; 67 return Study_Platform_PLATFORM_CHROMEOS;
68 #elif defined(OS_ANDROID) 68 #elif defined(OS_ANDROID)
69 return Study_Platform_PLATFORM_ANDROID; 69 return Study_Platform_PLATFORM_ANDROID;
70 #elif defined(OS_IOS)
71 return Study_Platform_PLATFORM_IOS;
70 #elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) 72 #elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
71 // Default BSD and SOLARIS to Linux to not break those builds, although these 73 // Default BSD and SOLARIS to Linux to not break those builds, although these
72 // platforms are not officially supported by Chrome. 74 // platforms are not officially supported by Chrome.
73 return Study_Platform_PLATFORM_LINUX; 75 return Study_Platform_PLATFORM_LINUX;
74 #else 76 #else
75 #error Unknown platform 77 #error Unknown platform
76 #endif 78 #endif
77 } 79 }
78 80
79 // Converts |date_time| in Study date format to base::Time. 81 // Converts |date_time| in Study date format to base::Time.
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 variation_id); 425 variation_id);
424 } 426 }
425 } 427 }
426 428
427 trial->SetForced(); 429 trial->SetForced();
428 if (IsStudyExpired(study, reference_date)) 430 if (IsStudyExpired(study, reference_date))
429 trial->Disable(); 431 trial->Disable();
430 } 432 }
431 433
432 } // namespace chrome_variations 434 } // namespace chrome_variations
OLDNEW
« no previous file with comments | « chrome/browser/metrics/proto/study.proto ('k') | chrome/browser/metrics/variations_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698