| OLD | NEW |
| 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 "chrome/common/extensions/manifest_handlers/settings_overrides_handler.
h" | 5 #include "chrome/common/extensions/manifest_handlers/settings_overrides_handler.
h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 manifest_errors::kInvalidSearchEngineURL, | 96 manifest_errors::kInvalidSearchEngineURL, |
| 97 *overrides->search_provider->favicon_url); | 97 *overrides->search_provider->favicon_url); |
| 98 return scoped_ptr<ChromeSettingsOverrides::Search_provider>(); | 98 return scoped_ptr<ChromeSettingsOverrides::Search_provider>(); |
| 99 } | 99 } |
| 100 return overrides->search_provider.Pass(); | 100 return overrides->search_provider.Pass(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 // A www. prefix is not informative and thus not worth the limited real estate | 103 // A www. prefix is not informative and thus not worth the limited real estate |
| 104 // in the permissions UI. | 104 // in the permissions UI. |
| 105 std::string RemoveWwwPrefix(const std::string& url) { | 105 std::string RemoveWwwPrefix(const std::string& url) { |
| 106 if (StartsWithASCII(url, kWwwPrefix, false)) | 106 if (base::StartsWithASCII(url, kWwwPrefix, false)) |
| 107 return url.substr(strlen(kWwwPrefix)); | 107 return url.substr(strlen(kWwwPrefix)); |
| 108 return url; | 108 return url; |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace | 111 } // namespace |
| 112 | 112 |
| 113 SettingsOverrides::SettingsOverrides() {} | 113 SettingsOverrides::SettingsOverrides() {} |
| 114 | 114 |
| 115 SettingsOverrides::~SettingsOverrides() {} | 115 SettingsOverrides::~SettingsOverrides() {} |
| 116 | 116 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 extension->SetManifestData(manifest_keys::kSettingsOverride, | 176 extension->SetManifestData(manifest_keys::kSettingsOverride, |
| 177 info.release()); | 177 info.release()); |
| 178 return true; | 178 return true; |
| 179 } | 179 } |
| 180 | 180 |
| 181 const std::vector<std::string> SettingsOverridesHandler::Keys() const { | 181 const std::vector<std::string> SettingsOverridesHandler::Keys() const { |
| 182 return SingleKey(manifest_keys::kSettingsOverride); | 182 return SingleKey(manifest_keys::kSettingsOverride); |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace extensions | 185 } // namespace extensions |
| OLD | NEW |