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/browser/search/most_visited_iframe_source.h" | 5 #include "chrome/browser/search/most_visited_iframe_source.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
12 #include "chrome/browser/search/local_files_ntp_source.h" | 12 #include "chrome/browser/search/local_files_ntp_source.h" |
13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/common/url_constants.h" | 14 #include "chrome/common/url_constants.h" |
15 #include "chrome/grit/browser_resources.h" | 15 #include "chrome/grit/browser_resources.h" |
16 #include "content/public/browser/user_metrics.h" | |
17 #include "net/base/url_util.h" | 16 #include "net/base/url_util.h" |
18 #include "url/gurl.h" | 17 #include "url/gurl.h" |
19 | 18 |
20 namespace { | 19 namespace { |
21 | 20 |
22 const char kTitleHTMLPath[] = "/title.html"; | 21 const char kTitleHTMLPath[] = "/title.html"; |
23 const char kTitleCSSPath[] = "/title.css"; | 22 const char kTitleCSSPath[] = "/title.css"; |
24 const char kTitleJSPath[] = "/title.js"; | 23 const char kTitleJSPath[] = "/title.js"; |
25 const char kThumbnailHTMLPath[] = "/thumbnail.html"; | 24 const char kThumbnailHTMLPath[] = "/thumbnail.html"; |
26 const char kThumbnailCSSPath[] = "/thumbnail.css"; | 25 const char kThumbnailCSSPath[] = "/thumbnail.css"; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 94 } |
96 } | 95 } |
97 | 96 |
98 bool MostVisitedIframeSource::ServesPath(const std::string& path) const { | 97 bool MostVisitedIframeSource::ServesPath(const std::string& path) const { |
99 return path == kTitleHTMLPath || path == kTitleCSSPath || | 98 return path == kTitleHTMLPath || path == kTitleCSSPath || |
100 path == kTitleJSPath || path == kThumbnailHTMLPath || | 99 path == kTitleJSPath || path == kThumbnailHTMLPath || |
101 path == kThumbnailCSSPath || path == kThumbnailJSPath || | 100 path == kThumbnailCSSPath || path == kThumbnailJSPath || |
102 path == kSingleHTMLPath || path == kSingleCSSPath || | 101 path == kSingleHTMLPath || path == kSingleCSSPath || |
103 path == kSingleJSPath || path == kUtilJSPath || path == kCommonCSSPath; | 102 path == kSingleJSPath || path == kUtilJSPath || path == kCommonCSSPath; |
104 } | 103 } |
OLD | NEW |