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

Side by Side Diff: chrome/browser/apps/app_browsertest.cc

Issue 156843004: Remove ExtensionService::extension_prefs() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix UserScriptListenerTests.MultiProfile Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/apps/ephemeral_app_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/app_window.h" 5 #include "apps/app_window.h"
6 #include "apps/app_window_registry.h" 6 #include "apps/app_window_registry.h"
7 #include "apps/launcher.h" 7 #include "apps/launcher.h"
8 #include "apps/ui/native_app_window.h" 8 #include "apps/ui/native_app_window.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 ASSERT_TRUE(extension); 1002 ASSERT_TRUE(extension);
1003 1003
1004 ExtensionTestMessageListener launched_listener("Launched", false); 1004 ExtensionTestMessageListener launched_listener("Launched", false);
1005 OpenApplication(AppLaunchParams( 1005 OpenApplication(AppLaunchParams(
1006 browser()->profile(), extension, LAUNCH_CONTAINER_NONE, NEW_WINDOW)); 1006 browser()->profile(), extension, LAUNCH_CONTAINER_NONE, NEW_WINDOW));
1007 1007
1008 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 1008 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
1009 ASSERT_FALSE(should_not_install.seen()); 1009 ASSERT_FALSE(should_not_install.seen());
1010 1010
1011 // Simulate a "downgrade" from version 2 in the test manifest.json to 1. 1011 // Simulate a "downgrade" from version 2 in the test manifest.json to 1.
1012 ExtensionPrefs* extension_prefs = 1012 ExtensionPrefs* extension_prefs = ExtensionPrefs::Get(browser()->profile());
1013 extensions::ExtensionSystem::Get(browser()->profile())->
1014 extension_service()->extension_prefs();
1015 1013
1016 // Clear the registered events to ensure they are updated. 1014 // Clear the registered events to ensure they are updated.
1017 extensions::ExtensionSystem::Get(browser()->profile())->event_router()-> 1015 extensions::ExtensionSystem::Get(browser()->profile())->event_router()->
1018 SetRegisteredEvents(extension->id(), std::set<std::string>()); 1016 SetRegisteredEvents(extension->id(), std::set<std::string>());
1019 1017
1020 DictionaryPrefUpdate update(extension_prefs->pref_service(), 1018 DictionaryPrefUpdate update(extension_prefs->pref_service(),
1021 extensions::pref_names::kExtensions); 1019 extensions::pref_names::kExtensions);
1022 base::DictionaryValue* dict = update.Get(); 1020 base::DictionaryValue* dict = update.Get();
1023 std::string key(extension->id()); 1021 std::string key(extension->id());
1024 key += ".manifest.version"; 1022 key += ".manifest.version";
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 1319
1322 ExtensionApiTest::ResultCatcher result_catcher; 1320 ExtensionApiTest::ResultCatcher result_catcher;
1323 1321
1324 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 1322 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
1325 1323
1326 EXPECT_TRUE(result_catcher.GetNextResult()); 1324 EXPECT_TRUE(result_catcher.GetNextResult());
1327 } 1325 }
1328 } 1326 }
1329 1327
1330 } // namespace extensions 1328 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/apps/ephemeral_app_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698