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

Side by Side Diff: chrome/browser/metrics/variations/resource_request_allowed_notifier_test_util.cc

Issue 10917120: Activate the VariationsService for ChromeOS and ensure that it does not ping the server until the E… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comments addressed. Created 8 years, 3 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/metrics/variations/resource_request_allowed_notifier_te st_util.h"
6
7 TestRequestAllowedNotifier::TestRequestAllowedNotifier()
8 : requests_allowed_(true),
9 #if defined(OS_CHROMEOS)
10 eula_accepted_(false),
11 #endif
12 override_requests_allowed_(true) {
13 }
14
15 TestRequestAllowedNotifier::~TestRequestAllowedNotifier() {
16 }
17
18 #if defined(OS_CHROMEOS)
19 void TestRequestAllowedNotifier::SetEulaAccepted(bool accepted) {
20 eula_accepted_ = accepted;
21 }
22 #endif
23
24 void TestRequestAllowedNotifier::SetRequestsAllowed(bool allowed) {
25 requests_allowed_ = allowed;
26 }
27
28 void TestRequestAllowedNotifier::OverrideRequestsAllowed(bool override) {
29 override_requests_allowed_ = override;
30 }
31
32 void TestRequestAllowedNotifier::NotifyObservers() {
33 requests_allowed_ = true;
34 MaybeNotifyObservers();
35 }
36
37 #if defined(OS_CHROMEOS)
38 bool TestRequestAllowedNotifier::IsEulaAccepted() {
39 return eula_accepted_;
40 }
41 #endif
42
43 bool TestRequestAllowedNotifier::ResourceRequestsAllowed() {
44 if (override_requests_allowed_)
45 return requests_allowed_;
46 else
Alexei Svitkine (slow) 2012/09/20 21:39:03 Nit: remove the else and unindent the next line.
SteveT 2012/09/21 15:16:17 Done.
47 return ResourceRequestAllowedNotifier::ResourceRequestsAllowed();
48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698