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

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

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/browser/policy/cloud_policy_constants.h" 8 #include "chrome/browser/policy/cloud_policy_constants.h"
9 #include "chrome/browser/policy/device_management_service.h" 9 #include "chrome/browser/policy/device_management_service.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 virtual ~CannedResponseInterceptor() { 48 virtual ~CannedResponseInterceptor() {
49 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 49 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
50 base::Bind(&Delegate::Unregister)); 50 base::Bind(&Delegate::Unregister));
51 } 51 }
52 52
53 private: 53 private:
54 class Delegate : public net::URLRequestJobFactory::ProtocolHandler { 54 class Delegate : public net::URLRequestJobFactory::ProtocolHandler {
55 public: 55 public:
56 explicit Delegate(const GURL& service_url) : service_url_(service_url) {} 56 explicit Delegate(const GURL& service_url) : service_url_(service_url) {}
57 ~Delegate() {} 57 virtual ~Delegate() {}
58 58
59 void Register() { 59 void Register() {
60 net::URLRequestFilter::GetInstance()->AddHostnameProtocolHandler( 60 net::URLRequestFilter::GetInstance()->AddHostnameProtocolHandler(
61 "http", "example.com", 61 "http", "example.com",
62 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(this)); 62 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(this));
63 } 63 }
64 64
65 static void Unregister() { 65 static void Unregister() {
66 net::URLRequestFilter::GetInstance()->RemoveHostnameHandler( 66 net::URLRequestFilter::GetInstance()->RemoveHostnameHandler(
67 "http", "example.com"); 67 "http", "example.com");
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 MessageLoop::current()->Run(); 243 MessageLoop::current()->Run();
244 } 244 }
245 245
246 INSTANTIATE_TEST_CASE_P( 246 INSTANTIATE_TEST_CASE_P(
247 DeviceManagementServiceIntegrationTestInstance, 247 DeviceManagementServiceIntegrationTestInstance,
248 DeviceManagementServiceIntegrationTest, 248 DeviceManagementServiceIntegrationTest,
249 testing::Values(&DeviceManagementServiceIntegrationTest::InitCannedResponse, 249 testing::Values(&DeviceManagementServiceIntegrationTest::InitCannedResponse,
250 &DeviceManagementServiceIntegrationTest::InitTestServer)); 250 &DeviceManagementServiceIntegrationTest::InitTestServer));
251 251
252 } // namespace policy 252 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698