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

Side by Side Diff: chrome/browser/search/local_omnibox_popup_source.cc

Issue 13945023: Make URLDataSource::GetSource() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And another one. Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/search/local_omnibox_popup_source.h ('k') | chrome/browser/ui/webui/about_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/local_omnibox_popup_source.h" 5 #include "chrome/browser/search/local_omnibox_popup_source.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 14 matching lines...) Expand all
25 const char kSearchIcon2xFilename[] = "images/2x/search_icon.png"; 25 const char kSearchIcon2xFilename[] = "images/2x/search_icon.png";
26 26
27 } // namespace 27 } // namespace
28 28
29 LocalOmniboxPopupSource::LocalOmniboxPopupSource() { 29 LocalOmniboxPopupSource::LocalOmniboxPopupSource() {
30 } 30 }
31 31
32 LocalOmniboxPopupSource::~LocalOmniboxPopupSource() { 32 LocalOmniboxPopupSource::~LocalOmniboxPopupSource() {
33 } 33 }
34 34
35 std::string LocalOmniboxPopupSource::GetSource() { 35 std::string LocalOmniboxPopupSource::GetSource() const {
36 return chrome::kChromeSearchLocalOmniboxPopupHost; 36 return chrome::kChromeSearchLocalOmniboxPopupHost;
37 } 37 }
38 38
39 void LocalOmniboxPopupSource::StartDataRequest( 39 void LocalOmniboxPopupSource::StartDataRequest(
40 const std::string& path, 40 const std::string& path,
41 bool is_incognito, 41 bool is_incognito,
42 const content::URLDataSource::GotDataCallback& callback) { 42 const content::URLDataSource::GotDataCallback& callback) {
43 int identifier = -1; 43 int identifier = -1;
44 if (path == kHtmlFilename) { 44 if (path == kHtmlFilename) {
45 identifier = IDR_LOCAL_OMNIBOX_POPUP_HTML; 45 identifier = IDR_LOCAL_OMNIBOX_POPUP_HTML;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 return false; 94 return false;
95 } 95 }
96 96
97 std::string LocalOmniboxPopupSource::GetContentSecurityPolicyFrameSrc() const { 97 std::string LocalOmniboxPopupSource::GetContentSecurityPolicyFrameSrc() const {
98 // Allow embedding of chrome search suggestion host. 98 // Allow embedding of chrome search suggestion host.
99 return base::StringPrintf("frame-src %s://%s/;", 99 return base::StringPrintf("frame-src %s://%s/;",
100 chrome::kChromeSearchScheme, 100 chrome::kChromeSearchScheme,
101 chrome::kChromeSearchSuggestionHost); 101 chrome::kChromeSearchSuggestionHost);
102 } 102 }
OLDNEW
« no previous file with comments | « chrome/browser/search/local_omnibox_popup_source.h ('k') | chrome/browser/ui/webui/about_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698