| OLD | NEW |
| 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/extensions/api/discovery/discovery_api.h" | 5 #include "chrome/browser/extensions/api/discovery/discovery_api.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/extensions/api/discovery/suggested_link.h" | 8 #include "chrome/browser/extensions/api/discovery/suggested_link.h" |
| 9 #include "chrome/browser/extensions/api/discovery/suggested_links_registry.h" | 9 #include "chrome/browser/extensions/api/discovery/suggested_links_registry.h" |
| 10 #include "chrome/browser/extensions/api/discovery/suggested_links_registry_facto
ry.h" | 10 #include "chrome/browser/extensions/api/discovery/suggested_links_registry_facto
ry.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/common/extensions/api/experimental_discovery.h" | 12 #include "chrome/common/extensions/api/experimental_discovery.h" |
| 13 #include "chrome/common/extensions/extension_error_utils.h" | 13 #include "extensions/common/extension_error_utils.h" |
| 14 | 14 |
| 15 namespace discovery = extensions::api::experimental_discovery; | 15 namespace discovery = extensions::api::experimental_discovery; |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 const char kInvalidScore[] = "Invalid score, must be between 0 and 1."; | 18 const char kInvalidScore[] = "Invalid score, must be between 0 and 1."; |
| 19 } // namespace | 19 } // namespace |
| 20 | 20 |
| 21 namespace extensions { | 21 namespace extensions { |
| 22 | 22 |
| 23 bool DiscoverySuggestFunction::RunImpl() { | 23 bool DiscoverySuggestFunction::RunImpl() { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 bool DiscoveryClearAllSuggestionsFunction::RunImpl() { | 65 bool DiscoveryClearAllSuggestionsFunction::RunImpl() { |
| 66 extensions::SuggestedLinksRegistry* registry = | 66 extensions::SuggestedLinksRegistry* registry = |
| 67 extensions::SuggestedLinksRegistryFactory::GetForProfile(profile()); | 67 extensions::SuggestedLinksRegistryFactory::GetForProfile(profile()); |
| 68 registry->ClearAll(extension_id()); | 68 registry->ClearAll(extension_id()); |
| 69 | 69 |
| 70 return true; | 70 return true; |
| 71 } | 71 } |
| 72 | 72 |
| 73 } // namespace extensions | 73 } // namespace extensions |
| 74 | 74 |
| OLD | NEW |