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

Side by Side Diff: extensions/browser/process_manager_unittest.cc

Issue 2149953002: Enable login screen apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Additional IsBackgroundPageAllowed check Created 3 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/process_manager.h" 5 #include "extensions/browser/process_manager.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "content/public/browser/content_browser_client.h" 8 #include "content/public/browser/content_browser_client.h"
9 #include "content/public/browser/notification_service.h" 9 #include "content/public/browser/notification_service.h"
10 #include "content/public/browser/site_instance.h" 10 #include "content/public/browser/site_instance.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // A trivial ProcessManagerDelegate. 40 // A trivial ProcessManagerDelegate.
41 class TestProcessManagerDelegate : public ProcessManagerDelegate { 41 class TestProcessManagerDelegate : public ProcessManagerDelegate {
42 public: 42 public:
43 TestProcessManagerDelegate() 43 TestProcessManagerDelegate()
44 : is_background_page_allowed_(true), 44 : is_background_page_allowed_(true),
45 defer_creating_startup_background_hosts_(false) {} 45 defer_creating_startup_background_hosts_(false) {}
46 ~TestProcessManagerDelegate() override {} 46 ~TestProcessManagerDelegate() override {}
47 47
48 // ProcessManagerDelegate implementation. 48 // ProcessManagerDelegate implementation.
49 bool IsBackgroundPageAllowed(BrowserContext* context) const override { 49 bool IsBackgroundPageAllowed(BrowserContext* context,
50 const Extension* extension) const override {
50 return is_background_page_allowed_; 51 return is_background_page_allowed_;
51 } 52 }
52 bool DeferCreatingStartupBackgroundHosts( 53 bool DeferCreatingStartupBackgroundHosts(
53 BrowserContext* context) const override { 54 BrowserContext* context) const override {
54 return defer_creating_startup_background_hosts_; 55 return defer_creating_startup_background_hosts_;
55 } 56 }
56 57
57 bool is_background_page_allowed_; 58 bool is_background_page_allowed_;
58 bool defer_creating_startup_background_hosts_; 59 bool defer_creating_startup_background_hosts_;
59 }; 60 };
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 scoped_refptr<SiteInstance> site21 = 239 scoped_refptr<SiteInstance> site21 =
239 manager1->GetSiteInstanceForURL(ext2_url1); 240 manager1->GetSiteInstanceForURL(ext2_url1);
240 EXPECT_NE(site11, site21); 241 EXPECT_NE(site11, site21);
241 242
242 scoped_refptr<SiteInstance> other_profile_site = 243 scoped_refptr<SiteInstance> other_profile_site =
243 manager2->GetSiteInstanceForURL(ext1_url1); 244 manager2->GetSiteInstanceForURL(ext1_url1);
244 EXPECT_NE(site11, other_profile_site); 245 EXPECT_NE(site11, other_profile_site);
245 } 246 }
246 247
247 } // namespace extensions 248 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698