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

Side by Side Diff: chrome/browser/extensions/lazy_background_page_apitest.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const Extension* extension, 75 const Extension* extension,
76 UnloadedExtensionInfo::Reason reason) override { 76 UnloadedExtensionInfo::Reason reason) override {
77 original_complete_.reset(new LazyBackgroundObserver(profile_)); 77 original_complete_.reset(new LazyBackgroundObserver(profile_));
78 incognito_complete_.reset( 78 incognito_complete_.reset(
79 new LazyBackgroundObserver(profile_->GetOffTheRecordProfile())); 79 new LazyBackgroundObserver(profile_->GetOffTheRecordProfile()));
80 } 80 }
81 81
82 Profile* profile_; 82 Profile* profile_;
83 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 83 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
84 extension_registry_observer_; 84 extension_registry_observer_;
85 scoped_ptr<LazyBackgroundObserver> original_complete_; 85 std::unique_ptr<LazyBackgroundObserver> original_complete_;
86 scoped_ptr<LazyBackgroundObserver> incognito_complete_; 86 std::unique_ptr<LazyBackgroundObserver> incognito_complete_;
87 }; 87 };
88 88
89 } // namespace 89 } // namespace
90 90
91 class LazyBackgroundPageApiTest : public ExtensionApiTest { 91 class LazyBackgroundPageApiTest : public ExtensionApiTest {
92 public: 92 public:
93 LazyBackgroundPageApiTest() {} 93 LazyBackgroundPageApiTest() {}
94 ~LazyBackgroundPageApiTest() override {} 94 ~LazyBackgroundPageApiTest() override {}
95 95
96 void SetUpInProcessBrowserTestFixture() override { 96 void SetUpInProcessBrowserTestFixture() override {
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 // handler calls an API function such as chrome.storage.local.set(). 653 // handler calls an API function such as chrome.storage.local.set().
654 // See: http://crbug.com/296834 654 // See: http://crbug.com/296834
655 IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, OnSuspendUseStorageApi) { 655 IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, OnSuspendUseStorageApi) {
656 EXPECT_TRUE(LoadExtensionAndWait("on_suspend")); 656 EXPECT_TRUE(LoadExtensionAndWait("on_suspend"));
657 } 657 }
658 658
659 // TODO: background page with timer. 659 // TODO: background page with timer.
660 // TODO: background page that interacts with popup. 660 // TODO: background page that interacts with popup.
661 661
662 } // namespace extensions 662 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698