diff options
author | jackhou@chromium.org <jackhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-15 08:23:17 +0000 |
---|---|---|
committer | jackhou@chromium.org <jackhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-15 08:23:17 +0000 |
commit | 9b1b5fe4dc536da2cbc01a4d223ad7fff424fcff (patch) | |
tree | 82ad613231f9cb87b0ca87685f3dccb8439760ac | |
parent | e43a047c9c5b4295111716de2b09fd8f5832c9ea (diff) | |
download | chromium_src-9b1b5fe4dc536da2cbc01a4d223ad7fff424fcff.zip chromium_src-9b1b5fe4dc536da2cbc01a4d223ad7fff424fcff.tar.gz chromium_src-9b1b5fe4dc536da2cbc01a4d223ad7fff424fcff.tar.bz2 |
Remove uses of web_app:: inside web_app.
Cleanup.
BUG=None
Review URL: https://codereview.chromium.org/281533003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270636 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/web_applications/web_app.cc | 55 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app.h | 56 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app_android.cc | 11 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app_chromeos.cc | 11 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app_linux.cc | 13 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app_mac.h | 13 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app_mac.mm | 28 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app_win.cc | 24 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app_win.h | 5 |
9 files changed, 95 insertions, 121 deletions
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc index a588a94..87cd12c 100644 --- a/chrome/browser/web_applications/web_app.cc +++ b/chrome/browser/web_applications/web_app.cc @@ -244,10 +244,9 @@ base::FilePath GetSanitizedFileName(const base::string16& name) { return base::FilePath(file_name); } -bool CreateShortcutsOnFileThread( - ShortcutCreationReason reason, - const web_app::ShortcutLocations& locations, - const web_app::ShortcutInfo& shortcut_info) { +bool CreateShortcutsOnFileThread(ShortcutCreationReason reason, + const ShortcutLocations& locations, + const ShortcutInfo& shortcut_info) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); return CreateShortcutsWithInfoOnFileThread( @@ -256,13 +255,13 @@ bool CreateShortcutsOnFileThread( } // namespace internals -web_app::ShortcutInfo::ShortcutInfo() +ShortcutInfo::ShortcutInfo() : is_platform_app(false) { } -web_app::ShortcutInfo::~ShortcutInfo() {} +ShortcutInfo::~ShortcutInfo() {} -web_app::ShortcutLocations::ShortcutLocations() +ShortcutLocations::ShortcutLocations() : on_desktop(false), applications_menu_location(APP_MENU_LOCATION_NONE), in_quick_launch_bar(false) @@ -273,7 +272,7 @@ web_app::ShortcutLocations::ShortcutLocations() } void GetShortcutInfoForTab(content::WebContents* web_contents, - web_app::ShortcutInfo* info) { + ShortcutInfo* info) { DCHECK(info); // Must provide a valid info. const FaviconTabHelper* favicon_tab_helper = @@ -300,9 +299,9 @@ void GetShortcutInfoForTab(content::WebContents* web_contents, void UpdateShortcutForTabContents(content::WebContents* web_contents) {} #endif -web_app::ShortcutInfo ShortcutInfoForExtensionAndProfile( +ShortcutInfo ShortcutInfoForExtensionAndProfile( const extensions::Extension* app, Profile* profile) { - web_app::ShortcutInfo shortcut_info; + ShortcutInfo shortcut_info; shortcut_info.extension_id = app->id(); shortcut_info.is_platform_app = app->is_platform_app(); shortcut_info.url = extensions::AppLaunchInfo::GetLaunchWebURL(app); @@ -315,10 +314,9 @@ web_app::ShortcutInfo ShortcutInfoForExtensionAndProfile( return shortcut_info; } -void UpdateShortcutInfoAndIconForApp( - const extensions::Extension* extension, - Profile* profile, - const web_app::ShortcutInfoCallback& callback) { +void UpdateShortcutInfoAndIconForApp(const extensions::Extension* extension, + Profile* profile, + const ShortcutInfoCallback& callback) { GetInfoForApp(extension, profile, base::Bind(&IgnoreFileHandlersInfo, callback)); @@ -359,14 +357,11 @@ base::FilePath GetWebAppDataDirectory(const base::FilePath& profile_path, GURL(extensions::AppLaunchInfo::GetLaunchWebURL(&extension))); } -std::string GenerateApplicationNameFromInfo( - const web_app::ShortcutInfo& shortcut_info) { +std::string GenerateApplicationNameFromInfo(const ShortcutInfo& shortcut_info) { if (!shortcut_info.extension_id.empty()) { - return web_app::GenerateApplicationNameFromExtensionId( - shortcut_info.extension_id); + return GenerateApplicationNameFromExtensionId(shortcut_info.extension_id); } else { - return web_app::GenerateApplicationNameFromURL( - shortcut_info.url); + return GenerateApplicationNameFromURL(shortcut_info.url); } } @@ -379,7 +374,7 @@ std::string GenerateApplicationNameFromURL(const GURL& url) { } std::string GenerateApplicationNameFromExtensionId(const std::string& id) { - std::string t(web_app::kCrxAppPrefix); + std::string t(kCrxAppPrefix); t.append(id); return t; } @@ -391,10 +386,9 @@ std::string GetExtensionIdFromApplicationName(const std::string& app_name) { return app_name.substr(prefix.length()); } -void CreateShortcutsForShortcutInfo( - web_app::ShortcutCreationReason reason, - const web_app::ShortcutLocations& locations, - const web_app::ShortcutInfo& shortcut_info) { +void CreateShortcutsForShortcutInfo(ShortcutCreationReason reason, + const ShortcutLocations& locations, + const ShortcutInfo& shortcut_info) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); BrowserThread::PostTask( @@ -405,11 +399,10 @@ void CreateShortcutsForShortcutInfo( reason, locations, shortcut_info)); } -void CreateShortcuts( - ShortcutCreationReason reason, - const web_app::ShortcutLocations& locations, - Profile* profile, - const extensions::Extension* app) { +void CreateShortcuts(ShortcutCreationReason reason, + const ShortcutLocations& locations, + Profile* profile, + const extensions::Extension* app) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); GetInfoForApp(app, @@ -424,7 +417,7 @@ void DeleteAllShortcuts(Profile* profile, const extensions::Extension* app) { BrowserThread::FILE, FROM_HERE, base::Bind(&DeleteShortcutsOnFileThread, - web_app::ShortcutInfoForExtensionAndProfile(app, profile))); + ShortcutInfoForExtensionAndProfile(app, profile))); } void UpdateAllShortcuts(const base::string16& old_app_title, diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h index 7c42ca1..9399868 100644 --- a/chrome/browser/web_applications/web_app.h +++ b/chrome/browser/web_applications/web_app.h @@ -99,12 +99,11 @@ enum ShortcutCreationReason { SHORTCUT_CREATION_AUTOMATED, }; -typedef base::Callback<void(const web_app::ShortcutInfo&)> - ShortcutInfoCallback; +typedef base::Callback<void(const ShortcutInfo&)> ShortcutInfoCallback; // Extracts shortcut info of the given WebContents. void GetShortcutInfoForTab(content::WebContents* web_contents, - web_app::ShortcutInfo* info); + ShortcutInfo* info); // Updates web app shortcut of the WebContents. This function checks and // updates web app icon and shortcuts if needed. For icon, the check is based @@ -113,16 +112,15 @@ void GetShortcutInfoForTab(content::WebContents* web_contents, // updates (recreates) them if they exits. void UpdateShortcutForTabContents(content::WebContents* web_contents); -web_app::ShortcutInfo ShortcutInfoForExtensionAndProfile( +ShortcutInfo ShortcutInfoForExtensionAndProfile( const extensions::Extension* app, Profile* profile); // Fetches the icon for |extension| and calls |callback| with shortcut info // filled out as by UpdateShortcutInfoForApp. -void UpdateShortcutInfoAndIconForApp( - const extensions::Extension* extension, - Profile* profile, - const ShortcutInfoCallback& callback); +void UpdateShortcutInfoAndIconForApp(const extensions::Extension* extension, + Profile* profile, + const ShortcutInfoCallback& callback); // Gets the user data directory for given web app. The path for the directory is // based on |extension_id|. If |extension_id| is empty then |url| is used @@ -137,8 +135,7 @@ base::FilePath GetWebAppDataDirectory(const base::FilePath& profile_path, const extensions::Extension& extension); // Compute a deterministic name based on data in the shortcut_info. -std::string GenerateApplicationNameFromInfo( - const web_app::ShortcutInfo& shortcut_info); +std::string GenerateApplicationNameFromInfo(const ShortcutInfo& shortcut_info); // Compute a deterministic name based on the URL. We use this pseudo name // as a key to store window location per application URLs in Browser and @@ -154,17 +151,15 @@ std::string GetExtensionIdFromApplicationName(const std::string& app_name); // Create shortcuts for web application based on given shortcut data. // |shortcut_info| contains information about the shortcuts to create, and // |creation_locations| contains information about where to create them. -void CreateShortcutsForShortcutInfo( - web_app::ShortcutCreationReason reason, - const web_app::ShortcutLocations& locations, - const web_app::ShortcutInfo& shortcut_info); +void CreateShortcutsForShortcutInfo(ShortcutCreationReason reason, + const ShortcutLocations& locations, + const ShortcutInfo& shortcut_info); // Creates shortcuts for an app. -void CreateShortcuts( - ShortcutCreationReason reason, - const web_app::ShortcutLocations& locations, - Profile* profile, - const extensions::Extension* app); +void CreateShortcuts(ShortcutCreationReason reason, + const ShortcutLocations& locations, + Profile* profile, + const extensions::Extension* app); // Delete all shortcuts that have been created for the given profile and // extension. @@ -184,8 +179,7 @@ bool IsValidUrl(const GURL& url); // Extracts icons info from web app data. Take only square shaped icons and // sort them from smallest to largest. typedef std::vector<WebApplicationInfo::IconInfo> IconInfoList; -void GetIconsInfo(const WebApplicationInfo& app_info, - IconInfoList* icons); +void GetIconsInfo(const WebApplicationInfo& app_info, IconInfoList* icons); #endif #if defined(OS_LINUX) @@ -201,17 +195,16 @@ namespace internals { // Returns the Windows user-level shortcut paths that are specified in // |creation_locations|. std::vector<base::FilePath> GetShortcutPaths( - const web_app::ShortcutLocations& creation_locations); + const ShortcutLocations& creation_locations); #endif // Creates a shortcut. Must be called on the file thread. This is used to // implement CreateShortcuts() above, and can also be used directly from the // file thread. |shortcut_info| contains info about the shortcut to create, and // |creation_locations| contains information about where to create them. -bool CreateShortcutsOnFileThread( - ShortcutCreationReason reason, - const web_app::ShortcutLocations& locations, - const web_app::ShortcutInfo& shortcut_info); +bool CreateShortcutsOnFileThread(ShortcutCreationReason reason, + const ShortcutLocations& locations, + const ShortcutInfo& shortcut_info); // Implemented for each platform, does the platform specific parts of creating // shortcuts. Used internally by CreateShortcutsOnFileThread. @@ -221,17 +214,16 @@ bool CreateShortcutsOnFileThread( // |creation_locations| contains information about where to create them. bool CreatePlatformShortcuts( const base::FilePath& shortcut_data_path, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info, - const web_app::ShortcutLocations& creation_locations, + const ShortcutLocations& creation_locations, ShortcutCreationReason creation_reason); // Delete all the shortcuts we have added for this extension. This is the // platform specific implementation of the DeleteAllShortcuts function, and // is executed on the FILE thread. -void DeletePlatformShortcuts( - const base::FilePath& shortcut_data_path, - const web_app::ShortcutInfo& shortcut_info); +void DeletePlatformShortcuts(const base::FilePath& shortcut_data_path, + const ShortcutInfo& shortcut_info); // Updates all the shortcuts we have added for this extension. This is the // platform specific implementation of the UpdateAllShortcuts function, and @@ -239,7 +231,7 @@ void DeletePlatformShortcuts( void UpdatePlatformShortcuts( const base::FilePath& shortcut_data_path, const base::string16& old_app_title, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info); // Delete all the shortcuts for an entire profile. diff --git a/chrome/browser/web_applications/web_app_android.cc b/chrome/browser/web_applications/web_app_android.cc index a87793a..2c40d47 100644 --- a/chrome/browser/web_applications/web_app_android.cc +++ b/chrome/browser/web_applications/web_app_android.cc @@ -9,21 +9,20 @@ namespace internals { bool CreatePlatformShortcuts( const base::FilePath& web_app_path, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info, - const web_app::ShortcutLocations& creation_locations, + const ShortcutLocations& creation_locations, ShortcutCreationReason creation_reason) { return true; } -void DeletePlatformShortcuts( - const base::FilePath& web_app_path, - const web_app::ShortcutInfo& shortcut_info) {} +void DeletePlatformShortcuts(const base::FilePath& web_app_path, + const ShortcutInfo& shortcut_info) {} void UpdatePlatformShortcuts( const base::FilePath& web_app_path, const base::string16& old_app_title, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info) {} void DeleteAllShortcutsForProfile(const base::FilePath& profile_path) {} diff --git a/chrome/browser/web_applications/web_app_chromeos.cc b/chrome/browser/web_applications/web_app_chromeos.cc index 717c29d..d21b9bc 100644 --- a/chrome/browser/web_applications/web_app_chromeos.cc +++ b/chrome/browser/web_applications/web_app_chromeos.cc @@ -9,21 +9,20 @@ namespace internals { bool CreatePlatformShortcuts( const base::FilePath& web_app_path, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info, - const web_app::ShortcutLocations& creation_locations, + const ShortcutLocations& creation_locations, ShortcutCreationReason creation_reason) { return true; } -void DeletePlatformShortcuts( - const base::FilePath& web_app_path, - const web_app::ShortcutInfo& shortcut_info) {} +void DeletePlatformShortcuts(const base::FilePath& web_app_path, + const ShortcutInfo& shortcut_info) {} void UpdatePlatformShortcuts( const base::FilePath& web_app_path, const base::string16& old_app_title, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info) {} void DeleteAllShortcutsForProfile(const base::FilePath& profile_path) {} diff --git a/chrome/browser/web_applications/web_app_linux.cc b/chrome/browser/web_applications/web_app_linux.cc index 680ce7f..4cde875 100644 --- a/chrome/browser/web_applications/web_app_linux.cc +++ b/chrome/browser/web_applications/web_app_linux.cc @@ -15,9 +15,9 @@ namespace internals { bool CreatePlatformShortcuts( const base::FilePath& web_app_path, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info, - const web_app::ShortcutLocations& creation_locations, + const ShortcutLocations& creation_locations, ShortcutCreationReason /*creation_reason*/) { #if !defined(OS_CHROMEOS) DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); @@ -28,9 +28,8 @@ bool CreatePlatformShortcuts( #endif } -void DeletePlatformShortcuts( - const base::FilePath& web_app_path, - const web_app::ShortcutInfo& shortcut_info) { +void DeletePlatformShortcuts(const base::FilePath& web_app_path, + const ShortcutInfo& shortcut_info) { #if !defined(OS_CHROMEOS) ShellIntegrationLinux::DeleteDesktopShortcuts(shortcut_info.profile_path, shortcut_info.extension_id); @@ -40,14 +39,14 @@ void DeletePlatformShortcuts( void UpdatePlatformShortcuts( const base::FilePath& web_app_path, const base::string16& /*old_app_title*/, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); scoped_ptr<base::Environment> env(base::Environment::Create()); // Find out whether shortcuts are already installed. - web_app::ShortcutLocations creation_locations = + ShortcutLocations creation_locations = ShellIntegrationLinux::GetExistingShortcutLocations( env.get(), shortcut_info.profile_path, shortcut_info.extension_id); // Always create a hidden shortcut in applications if a visible one is not diff --git a/chrome/browser/web_applications/web_app_mac.h b/chrome/browser/web_applications/web_app_mac.h index c96fdad..31fdb19 100644 --- a/chrome/browser/web_applications/web_app_mac.h +++ b/chrome/browser/web_applications/web_app_mac.h @@ -17,12 +17,11 @@ namespace web_app { // Returns the full path of the .app shim that would be created by -// web_app::CreateShortcuts(). -base::FilePath GetAppInstallPath( - const web_app::ShortcutInfo& shortcut_info); +// CreateShortcuts(). +base::FilePath GetAppInstallPath(const ShortcutInfo& shortcut_info); // If necessary, launch the shortcut for an app. -void MaybeLaunchShortcut(const web_app::ShortcutInfo& shortcut_info); +void MaybeLaunchShortcut(const ShortcutInfo& shortcut_info); // Creates a shortcut for a web application. The shortcut is a stub app // that simply loads the browser framework and runs the given app. @@ -32,7 +31,7 @@ class WebAppShortcutCreator { // A copy of the shortcut is placed in |app_data_dir|. // |chrome_bundle_id| is the CFBundleIdentifier of the Chrome browser bundle. WebAppShortcutCreator(const base::FilePath& app_data_dir, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info); virtual ~WebAppShortcutCreator(); @@ -51,7 +50,7 @@ class WebAppShortcutCreator { base::FilePath GetInternalShortcutPath() const; bool CreateShortcuts(ShortcutCreationReason creation_reason, - web_app::ShortcutLocations creation_locations); + ShortcutLocations creation_locations); void DeleteShortcuts(); bool UpdateShortcuts(); @@ -101,7 +100,7 @@ class WebAppShortcutCreator { base::FilePath app_data_dir_; // Information about the app. - web_app::ShortcutInfo info_; + ShortcutInfo info_; // The app's file handlers. extensions::FileHandlersInfo file_handlers_info_; diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm index 2acd33d..10d8a89 100644 --- a/chrome/browser/web_applications/web_app_mac.mm +++ b/chrome/browser/web_applications/web_app_mac.mm @@ -485,7 +485,7 @@ namespace web_app { WebAppShortcutCreator::WebAppShortcutCreator( const base::FilePath& app_data_dir, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info) : app_data_dir_(app_data_dir), info_(shortcut_info), @@ -567,7 +567,7 @@ size_t WebAppShortcutCreator::CreateShortcutsIn( bool WebAppShortcutCreator::CreateShortcuts( ShortcutCreationReason creation_reason, - web_app::ShortcutLocations creation_locations) { + ShortcutLocations creation_locations) { const base::FilePath applications_dir = GetApplicationsDirname(); if (applications_dir.empty() || !base::DirectoryExists(applications_dir.DirName())) { @@ -844,14 +844,13 @@ void WebAppShortcutCreator::RevealAppShimInFinder() const { inFileViewerRootedAtPath:nil]; } -base::FilePath GetAppInstallPath( - const web_app::ShortcutInfo& shortcut_info) { +base::FilePath GetAppInstallPath(const ShortcutInfo& shortcut_info) { WebAppShortcutCreator shortcut_creator( base::FilePath(), shortcut_info, extensions::FileHandlersInfo()); return shortcut_creator.GetApplicationsShortcutPath(); } -void MaybeLaunchShortcut(const web_app::ShortcutInfo& shortcut_info) { +void MaybeLaunchShortcut(const ShortcutInfo& shortcut_info) { if (!apps::IsAppShimsEnabled()) return; @@ -866,7 +865,7 @@ void CreateAppShortcutInfoLoaded( Profile* profile, const extensions::Extension* app, const base::Callback<void(bool)>& close_callback, - const web_app::ShortcutInfo& shortcut_info) { + const ShortcutInfo& shortcut_info) { base::scoped_nsobject<NSAlert> alert([[NSAlert alloc] init]); NSButton* continue_button = [alert @@ -905,10 +904,8 @@ void CreateAppShortcutInfoLoaded( if ([alert runModal] == NSAlertFirstButtonReturn && [application_folder_checkbox state] == NSOnState) { dialog_accepted = true; - web_app::CreateShortcuts(web_app::SHORTCUT_CREATION_BY_USER, - web_app::ShortcutLocations(), - profile, - app); + CreateShortcuts( + SHORTCUT_CREATION_BY_USER, ShortcutLocations(), profile, app); } if (!close_callback.is_null()) @@ -919,9 +916,9 @@ namespace internals { bool CreatePlatformShortcuts( const base::FilePath& app_data_path, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info, - const web_app::ShortcutLocations& creation_locations, + const ShortcutLocations& creation_locations, ShortcutCreationReason creation_reason) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); WebAppShortcutCreator shortcut_creator( @@ -929,9 +926,8 @@ bool CreatePlatformShortcuts( return shortcut_creator.CreateShortcuts(creation_reason, creation_locations); } -void DeletePlatformShortcuts( - const base::FilePath& app_data_path, - const web_app::ShortcutInfo& shortcut_info) { +void DeletePlatformShortcuts(const base::FilePath& app_data_path, + const ShortcutInfo& shortcut_info) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); WebAppShortcutCreator shortcut_creator( app_data_path, shortcut_info, extensions::FileHandlersInfo()); @@ -941,7 +937,7 @@ void DeletePlatformShortcuts( void UpdatePlatformShortcuts( const base::FilePath& app_data_path, const base::string16& old_app_title, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); WebAppShortcutCreator shortcut_creator( diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc index 87bd00b..0c630f6 100644 --- a/chrome/browser/web_applications/web_app_win.cc +++ b/chrome/browser/web_applications/web_app_win.cc @@ -327,9 +327,8 @@ void GetShortcutLocationsAndDeleteShortcuts( namespace web_app { -base::FilePath CreateShortcutInWebAppDir( - const base::FilePath& web_app_dir, - const web_app::ShortcutInfo& shortcut_info) { +base::FilePath CreateShortcutInWebAppDir(const base::FilePath& web_app_dir, + const ShortcutInfo& shortcut_info) { std::vector<base::FilePath> paths; paths.push_back(web_app_dir); std::vector<base::FilePath> out_filenames; @@ -376,9 +375,9 @@ bool CheckAndSaveIcon(const base::FilePath& icon_file, bool CreatePlatformShortcuts( const base::FilePath& web_app_path, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info, - const web_app::ShortcutLocations& creation_locations, + const ShortcutLocations& creation_locations, ShortcutCreationReason creation_reason) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); @@ -419,7 +418,7 @@ bool CreatePlatformShortcuts( void UpdatePlatformShortcuts( const base::FilePath& web_app_path, const base::string16& old_app_title, - const web_app::ShortcutInfo& shortcut_info, + const ShortcutInfo& shortcut_info, const extensions::FileHandlersInfo& file_handlers_info) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); @@ -456,9 +455,8 @@ void UpdatePlatformShortcuts( CheckAndSaveIcon(icon_file, shortcut_info.favicon); } -void DeletePlatformShortcuts( - const base::FilePath& web_app_path, - const web_app::ShortcutInfo& shortcut_info) { +void DeletePlatformShortcuts(const base::FilePath& web_app_path, + const ShortcutInfo& shortcut_info) { GetShortcutLocationsAndDeleteShortcuts( web_app_path, shortcut_info.profile_path, shortcut_info.title, NULL, NULL); @@ -492,7 +490,7 @@ void DeleteAllShortcutsForProfile(const base::FilePath& profile_path) { } std::vector<base::FilePath> GetShortcutPaths( - const web_app::ShortcutLocations& creation_locations) { + const ShortcutLocations& creation_locations) { // Shortcut paths under which to create shortcuts. std::vector<base::FilePath> shortcut_paths; // Locations to add to shortcut_paths. @@ -505,15 +503,15 @@ std::vector<base::FilePath> GetShortcutPaths( ShellUtil::SHORTCUT_LOCATION_DESKTOP }, { creation_locations.applications_menu_location == - web_app::APP_MENU_LOCATION_ROOT, + APP_MENU_LOCATION_ROOT, ShellUtil::SHORTCUT_LOCATION_START_MENU_ROOT }, { creation_locations.applications_menu_location == - web_app::APP_MENU_LOCATION_SUBDIR_CHROME, + APP_MENU_LOCATION_SUBDIR_CHROME, ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR }, { creation_locations.applications_menu_location == - web_app::APP_MENU_LOCATION_SUBDIR_CHROMEAPPS, + APP_MENU_LOCATION_SUBDIR_CHROMEAPPS, ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_APPS_DIR }, { // For Win7+, |in_quick_launch_bar| indicates that we are pinning to diff --git a/chrome/browser/web_applications/web_app_win.h b/chrome/browser/web_applications/web_app_win.h index 7e87c29..281de08 100644 --- a/chrome/browser/web_applications/web_app_win.h +++ b/chrome/browser/web_applications/web_app_win.h @@ -20,9 +20,8 @@ namespace web_app { // Create a shortcut in the given web app data dir, returning the name of the // created shortcut. -base::FilePath CreateShortcutInWebAppDir( - const base::FilePath& web_app_path, - const web_app::ShortcutInfo& shortcut_info); +base::FilePath CreateShortcutInWebAppDir(const base::FilePath& web_app_path, + const ShortcutInfo& shortcut_info); namespace internals { |