| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/bookmark_app_helper.h" | 5 #include "chrome/browser/extensions/bookmark_app_helper.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cctype> | 9 #include <cctype> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 &web_app_info_); | 318 &web_app_info_); |
| 319 scoped_refptr<extensions::CrxInstaller> installer( | 319 scoped_refptr<extensions::CrxInstaller> installer( |
| 320 extensions::CrxInstaller::CreateSilent(service_)); | 320 extensions::CrxInstaller::CreateSilent(service_)); |
| 321 installer->set_error_on_unsupported_requirements(true); | 321 installer->set_error_on_unsupported_requirements(true); |
| 322 installer->InstallWebApp(web_app_info_); | 322 installer->InstallWebApp(web_app_info_); |
| 323 } | 323 } |
| 324 | 324 |
| 325 ExtensionService* service_; | 325 ExtensionService* service_; |
| 326 WebApplicationInfo web_app_info_; | 326 WebApplicationInfo web_app_info_; |
| 327 | 327 |
| 328 scoped_ptr<content::WebContents> web_contents_; | 328 std::unique_ptr<content::WebContents> web_contents_; |
| 329 scoped_ptr<FaviconDownloader> favicon_downloader_; | 329 std::unique_ptr<FaviconDownloader> favicon_downloader_; |
| 330 std::vector<GURL> urls_to_download_; | 330 std::vector<GURL> urls_to_download_; |
| 331 std::vector<BookmarkAppHelper::BitmapAndSource> downloaded_bitmaps_; | 331 std::vector<BookmarkAppHelper::BitmapAndSource> downloaded_bitmaps_; |
| 332 }; | 332 }; |
| 333 | 333 |
| 334 } // namespace | 334 } // namespace |
| 335 | 335 |
| 336 namespace extensions { | 336 namespace extensions { |
| 337 | 337 |
| 338 // static | 338 // static |
| 339 void BookmarkAppHelper::UpdateWebAppInfoFromManifest( | 339 void BookmarkAppHelper::UpdateWebAppInfoFromManifest( |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 extension, info_list, base::Bind(&OnIconsLoaded, web_app_info, callback)); | 795 extension, info_list, base::Bind(&OnIconsLoaded, web_app_info, callback)); |
| 796 } | 796 } |
| 797 | 797 |
| 798 bool IsValidBookmarkAppUrl(const GURL& url) { | 798 bool IsValidBookmarkAppUrl(const GURL& url) { |
| 799 URLPattern origin_only_pattern(Extension::kValidBookmarkAppSchemes); | 799 URLPattern origin_only_pattern(Extension::kValidBookmarkAppSchemes); |
| 800 origin_only_pattern.SetMatchAllURLs(true); | 800 origin_only_pattern.SetMatchAllURLs(true); |
| 801 return url.is_valid() && origin_only_pattern.MatchesURL(url); | 801 return url.is_valid() && origin_only_pattern.MatchesURL(url); |
| 802 } | 802 } |
| 803 | 803 |
| 804 } // namespace extensions | 804 } // namespace extensions |
| OLD | NEW |