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

Side by Side Diff: components/offline_pages/offline_page_model_impl_unittest.cc

Issue 2317123002: c/browser, c/common, components O-P: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/offline_pages/offline_page_model_impl.h" 5 #include "components/offline_pages/offline_page_model_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 270
271 std::unique_ptr<OfflinePageMetadataStore> 271 std::unique_ptr<OfflinePageMetadataStore>
272 OfflinePageModelImplTest::BuildStore() { 272 OfflinePageModelImplTest::BuildStore() {
273 return std::unique_ptr<OfflinePageMetadataStore>( 273 return std::unique_ptr<OfflinePageMetadataStore>(
274 new OfflinePageTestStore(base::ThreadTaskRunnerHandle::Get())); 274 new OfflinePageTestStore(base::ThreadTaskRunnerHandle::Get()));
275 } 275 }
276 276
277 std::unique_ptr<OfflinePageModelImpl> OfflinePageModelImplTest::BuildModel( 277 std::unique_ptr<OfflinePageModelImpl> OfflinePageModelImplTest::BuildModel(
278 std::unique_ptr<OfflinePageMetadataStore> store) { 278 std::unique_ptr<OfflinePageMetadataStore> store) {
279 return std::unique_ptr<OfflinePageModelImpl>(new OfflinePageModelImpl( 279 return std::unique_ptr<OfflinePageModelImpl>(
280 std::move(store), temp_dir_.path(), base::ThreadTaskRunnerHandle::Get())); 280 new OfflinePageModelImpl(std::move(store), temp_dir_.GetPath(),
281 base::ThreadTaskRunnerHandle::Get()));
281 } 282 }
282 283
283 void OfflinePageModelImplTest::ResetModel() { 284 void OfflinePageModelImplTest::ResetModel() {
284 model_->RemoveObserver(this); 285 model_->RemoveObserver(this);
285 OfflinePageTestStore* old_store = GetStore(); 286 OfflinePageTestStore* old_store = GetStore();
286 std::unique_ptr<OfflinePageMetadataStore> new_store( 287 std::unique_ptr<OfflinePageMetadataStore> new_store(
287 new OfflinePageTestStore(*old_store)); 288 new OfflinePageTestStore(*old_store));
288 model_ = BuildModel(std::move(new_store)); 289 model_ = BuildModel(std::move(new_store));
289 model_->AddObserver(this); 290 model_->AddObserver(this);
290 PumpLoop(); 291 PumpLoop();
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 // Check if feature is correctly enabled by command-line flag. 1231 // Check if feature is correctly enabled by command-line flag.
1231 scoped_feature_list.reset(new base::test::ScopedFeatureList); 1232 scoped_feature_list.reset(new base::test::ScopedFeatureList);
1232 scoped_feature_list->InitFromCommandLine( 1233 scoped_feature_list->InitFromCommandLine(
1233 std::string(kOfflineBookmarksFeature.name) + "," + 1234 std::string(kOfflineBookmarksFeature.name) + "," +
1234 kOfflinePagesSharingFeature.name, 1235 kOfflinePagesSharingFeature.name,
1235 ""); 1236 "");
1236 EXPECT_TRUE(offline_pages::IsOfflinePagesSharingEnabled()); 1237 EXPECT_TRUE(offline_pages::IsOfflinePagesSharingEnabled());
1237 } 1238 }
1238 1239
1239 } // namespace offline_pages 1240 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698