Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 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 "ios/public/test/test_chrome_provider_initializer.h" | |
| 6 | |
| 7 #include "ios/public/test/test_chrome_browser_provider.h" | |
| 8 #include "testing/gtest/include/gtest/gtest.h" | |
| 9 | |
| 10 namespace ios { | |
| 11 | |
| 12 TestChromeProviderInitializer::TestChromeProviderInitializer() { | |
| 13 chrome_browser_provider_ = new TestChromeBrowserProvider(); | |
| 14 ios::SetChromeBrowserProvider(chrome_browser_provider_); | |
| 15 } | |
| 16 | |
| 17 TestChromeProviderInitializer::~TestChromeProviderInitializer() { | |
| 18 EXPECT_EQ(chrome_browser_provider_, ios::GetChromeBrowserProvider()); | |
| 19 ios::SetChromeBrowserProvider(NULL); | |
| 20 delete chrome_browser_provider_; | |
|
Alexei Svitkine (slow)
2015/01/08 16:52:13
Nit: Maybe should be a scoped_ptr instead?
| |
| 21 } | |
| 22 | |
| 23 } // namespace ios | |
| OLD | NEW |