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

Unified Diff: chrome/browser/extensions/extension_apitest.cc

Issue 3210007: Add support for a "split" incognito behavior for extensions. (Closed)
Patch Set: latest Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_apitest.cc
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index ba4da598086e0b7dfc6c2566f1d6f150ec13ce50..c5e1f54b8b8c266127bf2128fd76de806c7433c9 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -11,7 +11,8 @@
#include "chrome/common/notification_registrar.h"
#include "chrome/test/ui_test_utils.h"
-ExtensionApiTest::ResultCatcher::ResultCatcher() {
+ExtensionApiTest::ResultCatcher::ResultCatcher()
+ : profile_restriction_(NULL) {
registrar_.Add(this, NotificationType::EXTENSION_TEST_PASSED,
NotificationService::AllSources());
registrar_.Add(this, NotificationType::EXTENSION_TEST_FAILED,
@@ -44,6 +45,11 @@ bool ExtensionApiTest::ResultCatcher::GetNextResult() {
void ExtensionApiTest::ResultCatcher::Observe(
NotificationType type, const NotificationSource& source,
const NotificationDetails& details) {
+ if (profile_restriction_ &&
+ Source<Profile>(source).ptr() != profile_restriction_) {
+ return;
+ }
+
switch (type.value) {
case NotificationType::EXTENSION_TEST_PASSED:
std::cout << "Got EXTENSION_TEST_PASSED notification.\n";
« no previous file with comments | « chrome/browser/extensions/extension_apitest.h ('k') | chrome/browser/extensions/extension_bookmark_manager_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698