| 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 #ifndef CHROME_BROWSER_SEARCH_MOST_VISITED_IFRAME_SOURCE_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_MOST_VISITED_IFRAME_SOURCE_H_ |
| 6 #define CHROME_BROWSER_SEARCH_MOST_VISITED_IFRAME_SOURCE_H_ | 6 #define CHROME_BROWSER_SEARCH_MOST_VISITED_IFRAME_SOURCE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 protected: | 32 protected: |
| 33 // Overridden from IframeSource: | 33 // Overridden from IframeSource: |
| 34 virtual std::string GetSource() const OVERRIDE; | 34 virtual std::string GetSource() const OVERRIDE; |
| 35 | 35 |
| 36 virtual bool ServesPath(const std::string& path) const OVERRIDE; | 36 virtual bool ServesPath(const std::string& path) const OVERRIDE; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 FRIEND_TEST_ALL_PREFIXES(MostVisitedIframeSourceTest, | 39 FRIEND_TEST_ALL_PREFIXES(MostVisitedIframeSourceTest, |
| 40 LogEndpointIsValidWithProvider); | 40 LogEndpointIsValidWithProvider); |
| 41 | 41 |
| 42 // Logs the click on a Most Visited tile for a specific |provider|. Note that | |
| 43 // the UMA_HISTOGRAM_ENUMERATION macro cannot be used since it caches the | |
| 44 // histogram object at the call site, which will not work in this case. | |
| 45 void LogMostVisitedProviderClick(int position, const std::string& provider); | |
| 46 | |
| 47 // Returns the name of the histogram that should be logged for a click to a | |
| 48 // specified Most Visited |provider|. | |
| 49 static std::string GetHistogramNameForProvider(const std::string& provider); | |
| 50 | |
| 51 DISALLOW_COPY_AND_ASSIGN(MostVisitedIframeSource); | 42 DISALLOW_COPY_AND_ASSIGN(MostVisitedIframeSource); |
| 52 }; | 43 }; |
| 53 | 44 |
| 54 #endif // CHROME_BROWSER_SEARCH_MOST_VISITED_IFRAME_SOURCE_H_ | 45 #endif // CHROME_BROWSER_SEARCH_MOST_VISITED_IFRAME_SOURCE_H_ |
| OLD | NEW |