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

Side by Side Diff: chrome/common/extensions/manifest_url_handler.cc

Issue 540113002: Reorder "action links" on chrome://extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_remove_install_from_webstore_flag
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/common/extensions/manifest_url_handler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/extensions/manifest_url_handler.h" 5 #include "chrome/common/extensions/manifest_url_handler.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return homepage_url; 59 return homepage_url;
60 bool use_webstore_url = UpdatesFromGallery(extension) && 60 bool use_webstore_url = UpdatesFromGallery(extension) &&
61 !SharedModuleInfo::IsSharedModule(extension); 61 !SharedModuleInfo::IsSharedModule(extension);
62 return use_webstore_url 62 return use_webstore_url
63 ? GURL(extension_urls::GetWebstoreItemDetailURLPrefix() + 63 ? GURL(extension_urls::GetWebstoreItemDetailURLPrefix() +
64 extension->id()) 64 extension->id())
65 : GURL::EmptyGURL(); 65 : GURL::EmptyGURL();
66 } 66 }
67 67
68 // static 68 // static
69 bool ManifestURL::SpecifiedHomepageURL(const Extension* extension) {
70 return GetManifestURL(extension, keys::kHomepageURL).is_valid();
71 }
72
73 // static
69 const GURL& ManifestURL::GetUpdateURL(const Extension* extension) { 74 const GURL& ManifestURL::GetUpdateURL(const Extension* extension) {
70 return GetManifestURL(extension, keys::kUpdateURL); 75 return GetManifestURL(extension, keys::kUpdateURL);
71 } 76 }
72 77
73 // static 78 // static
74 bool ManifestURL::UpdatesFromGallery(const Extension* extension) { 79 bool ManifestURL::UpdatesFromGallery(const Extension* extension) {
75 return extension_urls::IsWebstoreUpdateUrl(GetUpdateURL(extension)); 80 return extension_urls::IsWebstoreUpdateUrl(GetUpdateURL(extension));
76 } 81 }
77 82
78 // static 83 // static
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 extension->SetManifestData(keys::kChromeURLOverrides, 389 extension->SetManifestData(keys::kChromeURLOverrides,
385 url_overrides.release()); 390 url_overrides.release());
386 return true; 391 return true;
387 } 392 }
388 393
389 const std::vector<std::string> URLOverridesHandler::Keys() const { 394 const std::vector<std::string> URLOverridesHandler::Keys() const {
390 return SingleKey(keys::kChromeURLOverrides); 395 return SingleKey(keys::kChromeURLOverrides);
391 } 396 }
392 397
393 } // namespace extensions 398 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/manifest_url_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698