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

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

Issue 11365181: Remove GetExtensionService from Profile. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: replace missing extension_system include Created 8 years 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/extensions/app_notify_channel_setup.h" 6 #include "chrome/browser/extensions/app_notify_channel_setup.h"
7 #include "chrome/browser/extensions/extension_browsertest.h" 7 #include "chrome/browser/extensions/extension_browsertest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_system.h"
9 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/extensions/application_launch.h" 12 #include "chrome/browser/ui/extensions/application_launch.h"
12 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/extensions/extension.h" 14 #include "chrome/common/extensions/extension.h"
14 #include "chrome/test/base/ui_test_utils.h" 15 #include "chrome/test/base/ui_test_utils.h"
15 #include "content/public/browser/browser_thread.h" 16 #include "content/public/browser/browser_thread.h"
16 17
17 using content::BrowserThread; 18 using content::BrowserThread;
18 19
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 LoadExtension(test_data_dir_.AppendASCII("app_notifications")); 62 LoadExtension(test_data_dir_.AppendASCII("app_notifications"));
62 ASSERT_TRUE(app != NULL); 63 ASSERT_TRUE(app != NULL);
63 64
64 application_launch::OpenApplication(application_launch::LaunchParams( 65 application_launch::OpenApplication(application_launch::LaunchParams(
65 browser()->profile(), app, extension_misc::LAUNCH_TAB, 66 browser()->profile(), app, extension_misc::LAUNCH_TAB,
66 NEW_FOREGROUND_TAB)); 67 NEW_FOREGROUND_TAB));
67 if (!interceptor.was_called()) 68 if (!interceptor.was_called())
68 content::RunMessageLoop(); 69 content::RunMessageLoop();
69 EXPECT_TRUE(interceptor.was_called()); 70 EXPECT_TRUE(interceptor.was_called());
70 71
71 ExtensionService* service = browser()->profile()->GetExtensionService(); 72 ExtensionService* service = extensions::ExtensionSystem::Get(
73 browser()->profile())->extension_service();
72 ExtensionPrefs* prefs = service->extension_prefs(); 74 ExtensionPrefs* prefs = service->extension_prefs();
73 std::string saved_id = prefs->GetAppNotificationClientId(app->id()); 75 std::string saved_id = prefs->GetAppNotificationClientId(app->id());
74 EXPECT_EQ(kExpectedClientId, saved_id); 76 EXPECT_EQ(kExpectedClientId, saved_id);
75 } 77 }
76 78
77 } // namespace extensions 79 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698