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

Side by Side Diff: ios/public/test/test_chrome_provider_initializer.cc

Issue 826803003: Cleanup in ios/chrome and ios/public/test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 11 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
« no previous file with comments | « ios/public/test/test_chrome_provider_initializer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 "ios/public/test/test_chrome_provider_initializer.h" 5 #include "ios/public/test/test_chrome_provider_initializer.h"
6 6
7 #include "ios/public/test/test_chrome_browser_provider.h" 7 #include "ios/public/test/test_chrome_browser_provider.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace ios { 10 namespace ios {
11 11
12 TestChromeProviderInitializer::TestChromeProviderInitializer() { 12 TestChromeProviderInitializer::TestChromeProviderInitializer() {
13 chrome_browser_provider_ = new TestChromeBrowserProvider(); 13 chrome_browser_provider_.reset(new TestChromeBrowserProvider());
14 ios::SetChromeBrowserProvider(chrome_browser_provider_); 14 ios::SetChromeBrowserProvider(chrome_browser_provider_.get());
15 } 15 }
16 16
17 TestChromeProviderInitializer::~TestChromeProviderInitializer() { 17 TestChromeProviderInitializer::~TestChromeProviderInitializer() {
18 EXPECT_EQ(chrome_browser_provider_, ios::GetChromeBrowserProvider()); 18 EXPECT_EQ(chrome_browser_provider_.get(), ios::GetChromeBrowserProvider());
19 ios::SetChromeBrowserProvider(NULL); 19 ios::SetChromeBrowserProvider(NULL);
20 delete chrome_browser_provider_;
21 } 20 }
22 21
23 } // namespace ios 22 } // namespace ios
OLDNEW
« no previous file with comments | « ios/public/test/test_chrome_provider_initializer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698