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

Side by Side Diff: chrome/browser/chromeos/extensions/wallpaper_manager_util.cc

Issue 722703002: Make "source" a required argument of AppLaunchParams and fill in the argument in all call points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" 5 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
11 #include "chrome/browser/ui/extensions/app_launch_params.h"
11 #include "chrome/browser/ui/extensions/application_launch.h" 12 #include "chrome/browser/ui/extensions/application_launch.h"
12 #include "chrome/common/extensions/extension_constants.h" 13 #include "chrome/common/extensions/extension_constants.h"
13 #include "extensions/browser/extension_system.h" 14 #include "extensions/browser/extension_system.h"
15 #include "extensions/common/constants.h"
14 #include "extensions/common/extension.h" 16 #include "extensions/common/extension.h"
15 #include "ui/base/window_open_disposition.h" 17 #include "ui/base/window_open_disposition.h"
16 18
17 namespace wallpaper_manager_util { 19 namespace wallpaper_manager_util {
18 20
19 void OpenWallpaperManager() { 21 void OpenWallpaperManager() {
20 Profile* profile = ProfileManager::GetActiveUserProfile(); 22 Profile* profile = ProfileManager::GetActiveUserProfile();
21 DCHECK(profile); 23 DCHECK(profile);
22 24
23 ExtensionService* service = 25 ExtensionService* service =
24 extensions::ExtensionSystem::Get(profile)->extension_service(); 26 extensions::ExtensionSystem::Get(profile)->extension_service();
25 if (!service) 27 if (!service)
26 return; 28 return;
27 29
28 const extensions::Extension* extension = 30 const extensions::Extension* extension =
29 service->GetExtensionById(extension_misc::kWallpaperManagerId, false); 31 service->GetExtensionById(extension_misc::kWallpaperManagerId, false);
30 if (!extension) 32 if (!extension)
31 return; 33 return;
32 34
33 OpenApplication(AppLaunchParams(profile, extension, 35 OpenApplication(
34 extensions::LAUNCH_CONTAINER_WINDOW, 36 AppLaunchParams(profile, extension, extensions::LAUNCH_CONTAINER_WINDOW,
35 NEW_WINDOW)); 37 NEW_WINDOW, extensions::SOURCE_CHROME_INTERNAL));
36 } 38 }
37 39
38 } // namespace wallpaper_manager_util 40 } // namespace wallpaper_manager_util
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/app_mode/startup_app_launcher.cc ('k') | chrome/browser/chromeos/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698