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

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

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 void Wait() { 69 void Wait() {
70 ASSERT_TRUE(original_complete_.get()); 70 ASSERT_TRUE(original_complete_.get());
71 original_complete_->Wait(); 71 original_complete_->Wait();
72 incognito_complete_->Wait(); 72 incognito_complete_->Wait();
73 } 73 }
74 74
75 private: 75 private:
76 void OnExtensionUnloaded(content::BrowserContext* browser_context, 76 void OnExtensionUnloaded(content::BrowserContext* browser_context,
77 const Extension* extension, 77 const Extension* extension,
78 UnloadedExtensionInfo::Reason reason) override { 78 UnloadedExtensionReason reason) override {
79 original_complete_.reset(new LazyBackgroundObserver(profile_)); 79 original_complete_.reset(new LazyBackgroundObserver(profile_));
80 incognito_complete_.reset( 80 incognito_complete_.reset(
81 new LazyBackgroundObserver(profile_->GetOffTheRecordProfile())); 81 new LazyBackgroundObserver(profile_->GetOffTheRecordProfile()));
82 } 82 }
83 83
84 Profile* profile_; 84 Profile* profile_;
85 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 85 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
86 extension_registry_observer_; 86 extension_registry_observer_;
87 std::unique_ptr<LazyBackgroundObserver> original_complete_; 87 std::unique_ptr<LazyBackgroundObserver> original_complete_;
88 std::unique_ptr<LazyBackgroundObserver> incognito_complete_; 88 std::unique_ptr<LazyBackgroundObserver> incognito_complete_;
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 // See https://crbug.com/612668. 662 // See https://crbug.com/612668.
663 IN_PROC_BROWSER_TEST_F(LazyBackgroundPageIsolatedExtensionsApiTest, 663 IN_PROC_BROWSER_TEST_F(LazyBackgroundPageIsolatedExtensionsApiTest,
664 EventProcessCleanup) { 664 EventProcessCleanup) {
665 ASSERT_TRUE(LoadExtensionAndWait("event_page_with_web_iframe")); 665 ASSERT_TRUE(LoadExtensionAndWait("event_page_with_web_iframe"));
666 666
667 // Lazy Background Page doesn't exist anymore. 667 // Lazy Background Page doesn't exist anymore.
668 EXPECT_FALSE(IsBackgroundPageAlive(last_loaded_extension_id())); 668 EXPECT_FALSE(IsBackgroundPageAlive(last_loaded_extension_id()));
669 } 669 }
670 670
671 } // namespace extensions 671 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_web_ui_override_registrar.cc ('k') | chrome/browser/extensions/menu_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698