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

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: additional cleanup 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
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/launcher.h" 5 #include "apps/launcher.h"
6 #include "apps/shell_window.h" 6 #include "apps/shell_window.h"
7 #include "apps/shell_window_registry.h" 7 #include "apps/shell_window_registry.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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 ASSERT_TRUE(extension); 1010 ASSERT_TRUE(extension);
1011 1011
1012 ExtensionTestMessageListener launched_listener("Launched", false); 1012 ExtensionTestMessageListener launched_listener("Launched", false);
1013 OpenApplication(AppLaunchParams( 1013 OpenApplication(AppLaunchParams(
1014 browser()->profile(), extension, LAUNCH_CONTAINER_NONE, NEW_WINDOW)); 1014 browser()->profile(), extension, LAUNCH_CONTAINER_NONE, NEW_WINDOW));
1015 1015
1016 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 1016 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
1017 ASSERT_FALSE(should_not_install.seen()); 1017 ASSERT_FALSE(should_not_install.seen());
1018 1018
1019 // Simulate a "downgrade" from version 2 in the test manifest.json to 1. 1019 // Simulate a "downgrade" from version 2 in the test manifest.json to 1.
1020 ExtensionPrefs* extension_prefs = 1020 ExtensionPrefs* extension_prefs = ExtensionPrefs::Get(browser()->profile());
1021 extensions::ExtensionSystem::Get(browser()->profile())->
1022 extension_service()->extension_prefs();
1023 1021
1024 // Clear the registered events to ensure they are updated. 1022 // Clear the registered events to ensure they are updated.
1025 extensions::ExtensionSystem::Get(browser()->profile())->event_router()-> 1023 extensions::ExtensionSystem::Get(browser()->profile())->event_router()->
1026 SetRegisteredEvents(extension->id(), std::set<std::string>()); 1024 SetRegisteredEvents(extension->id(), std::set<std::string>());
1027 1025
1028 DictionaryPrefUpdate update(extension_prefs->pref_service(), 1026 DictionaryPrefUpdate update(extension_prefs->pref_service(),
1029 extensions::pref_names::kExtensions); 1027 extensions::pref_names::kExtensions);
1030 base::DictionaryValue* dict = update.Get(); 1028 base::DictionaryValue* dict = update.Get();
1031 std::string key(extension->id()); 1029 std::string key(extension->id());
1032 key += ".manifest.version"; 1030 key += ".manifest.version";
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 1325
1328 ExtensionApiTest::ResultCatcher result_catcher; 1326 ExtensionApiTest::ResultCatcher result_catcher;
1329 1327
1330 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); 1328 ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
1331 1329
1332 EXPECT_TRUE(result_catcher.GetNextResult()); 1330 EXPECT_TRUE(result_catcher.GetNextResult());
1333 } 1331 }
1334 } 1332 }
1335 1333
1336 } // namespace extensions 1334 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698