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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 1312423003: Turn VariationsService::GetVariationsServerURL into instance method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 3757 matching lines...) Expand 10 before | Expand all | Expand 10 after
3768 provider_.UpdateChromePolicy(policies); 3768 provider_.UpdateChromePolicy(policies);
3769 } 3769 }
3770 }; 3770 };
3771 3771
3772 IN_PROC_BROWSER_TEST_F(PolicyVariationsServiceTest, VariationsURLIsValid) { 3772 IN_PROC_BROWSER_TEST_F(PolicyVariationsServiceTest, VariationsURLIsValid) {
3773 const std::string default_variations_url = 3773 const std::string default_variations_url =
3774 chrome_variations::VariationsService:: 3774 chrome_variations::VariationsService::
3775 GetDefaultVariationsServerURLForTesting(); 3775 GetDefaultVariationsServerURLForTesting();
3776 3776
3777 const GURL url = 3777 const GURL url =
3778 chrome_variations::VariationsService::GetVariationsServerURL( 3778 g_browser_process->variations_service()->GetVariationsServerURL(
bartfab (slow) 2015/08/29 07:25:09 Nit: #include "chrome/browser/browser_process.h"
3779 g_browser_process->local_state(), std::string()); 3779 g_browser_process->local_state(), std::string());
3780 EXPECT_TRUE(base::StartsWith(url.spec(), default_variations_url, 3780 EXPECT_TRUE(base::StartsWith(url.spec(), default_variations_url,
3781 base::CompareCase::SENSITIVE)); 3781 base::CompareCase::SENSITIVE));
3782 std::string value; 3782 std::string value;
3783 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); 3783 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value));
3784 EXPECT_EQ("restricted", value); 3784 EXPECT_EQ("restricted", value);
3785 } 3785 }
3786 3786
3787 IN_PROC_BROWSER_TEST_F(PolicyTest, NativeMessagingBlacklistSelective) { 3787 IN_PROC_BROWSER_TEST_F(PolicyTest, NativeMessagingBlacklistSelective) {
3788 base::ListValue blacklist; 3788 base::ListValue blacklist;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
3856 3856
3857 IN_PROC_BROWSER_TEST_F(HardwareAccelerationModePolicyTest, 3857 IN_PROC_BROWSER_TEST_F(HardwareAccelerationModePolicyTest,
3858 HardwareAccelerationDisabled) { 3858 HardwareAccelerationDisabled) {
3859 // Verifies that hardware acceleration can be disabled with policy. 3859 // Verifies that hardware acceleration can be disabled with policy.
3860 EXPECT_FALSE( 3860 EXPECT_FALSE(
3861 content::GpuDataManager::GetInstance()->GpuAccessAllowed(nullptr)); 3861 content::GpuDataManager::GetInstance()->GpuAccessAllowed(nullptr));
3862 } 3862 }
3863 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 3863 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
3864 3864
3865 } // namespace policy 3865 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698