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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 2855009: Only allow installation of extensions/apps with gallery update url via download from gallery (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: name change Created 10 years, 6 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 11 matching lines...) Expand all
22 #include "base/string_piece.h" 22 #include "base/string_piece.h"
23 #include "base/string_util.h" 23 #include "base/string_util.h"
24 #include "base/time.h" 24 #include "base/time.h"
25 #include "build/build_config.h" 25 #include "build/build_config.h"
26 #include "chrome/common/appcache/appcache_dispatcher.h" 26 #include "chrome/common/appcache/appcache_dispatcher.h"
27 #include "chrome/common/bindings_policy.h" 27 #include "chrome/common/bindings_policy.h"
28 #include "chrome/common/child_process_logging.h" 28 #include "chrome/common/child_process_logging.h"
29 #include "chrome/common/chrome_constants.h" 29 #include "chrome/common/chrome_constants.h"
30 #include "chrome/common/chrome_paths.h" 30 #include "chrome/common/chrome_paths.h"
31 #include "chrome/common/chrome_switches.h" 31 #include "chrome/common/chrome_switches.h"
32 #include "chrome/common/extensions/extension_constants.h" 32 #include "chrome/common/extensions/extension.h"
33 #include "chrome/common/jstemplate_builder.h" 33 #include "chrome/common/jstemplate_builder.h"
34 #include "chrome/common/page_zoom.h" 34 #include "chrome/common/page_zoom.h"
35 #include "chrome/common/pepper_plugin_registry.h" 35 #include "chrome/common/pepper_plugin_registry.h"
36 #include "chrome/common/render_messages.h" 36 #include "chrome/common/render_messages.h"
37 #include "chrome/common/renderer_preferences.h" 37 #include "chrome/common/renderer_preferences.h"
38 #include "chrome/common/thumbnail_score.h" 38 #include "chrome/common/thumbnail_score.h"
39 #include "chrome/common/url_constants.h" 39 #include "chrome/common/url_constants.h"
40 #include "chrome/common/window_container_type.h" 40 #include "chrome/common/window_container_type.h"
41 #include "chrome/renderer/about_handler.h" 41 #include "chrome/renderer/about_handler.h"
42 #include "chrome/renderer/audio_message_filter.h" 42 #include "chrome/renderer/audio_message_filter.h"
(...skipping 4880 matching lines...) Expand 10 before | Expand all | Expand 10 after
4923 return; 4923 return;
4924 } 4924 }
4925 4925
4926 ExecuteCodeImpl(main_frame, params); 4926 ExecuteCodeImpl(main_frame, params);
4927 } 4927 }
4928 4928
4929 void RenderView::ExecuteCodeImpl(WebFrame* frame, 4929 void RenderView::ExecuteCodeImpl(WebFrame* frame,
4930 const ViewMsg_ExecuteCode_Params& params) { 4930 const ViewMsg_ExecuteCode_Params& params) {
4931 // Don't execute scripts in gallery pages. 4931 // Don't execute scripts in gallery pages.
4932 GURL frame_url = GURL(frame->url()); 4932 GURL frame_url = GURL(frame->url());
4933 if (frame_url.host() == GURL(extension_urls::kGalleryBrowsePrefix).host()) { 4933 if (frame_url.host() == GURL(Extension::ChromeStoreURL()).host()) {
4934 Send(new ViewMsg_ExecuteCodeFinished(routing_id_, params.request_id, true)); 4934 Send(new ViewMsg_ExecuteCodeFinished(routing_id_, params.request_id, true));
4935 return; 4935 return;
4936 } 4936 }
4937 4937
4938 std::vector<WebFrame*> frame_vector; 4938 std::vector<WebFrame*> frame_vector;
4939 frame_vector.push_back(frame); 4939 frame_vector.push_back(frame);
4940 if (params.all_frames) 4940 if (params.all_frames)
4941 GetAllChildFrames(frame, &frame_vector); 4941 GetAllChildFrames(frame, &frame_vector);
4942 4942
4943 for (std::vector<WebFrame*>::iterator frame_it = frame_vector.begin(); 4943 for (std::vector<WebFrame*>::iterator frame_it = frame_vector.begin();
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
5151 webkit_glue::FormData form; 5151 webkit_glue::FormData form;
5152 const WebInputElement element = node.toConst<WebInputElement>(); 5152 const WebInputElement element = node.toConst<WebInputElement>();
5153 if (!form_manager_.FindFormWithFormControlElement( 5153 if (!form_manager_.FindFormWithFormControlElement(
5154 element, FormManager::REQUIRE_NONE, &form)) 5154 element, FormManager::REQUIRE_NONE, &form))
5155 return; 5155 return;
5156 5156
5157 autofill_action_ = action; 5157 autofill_action_ = action;
5158 Send(new ViewHostMsg_FillAutoFillFormData( 5158 Send(new ViewHostMsg_FillAutoFillFormData(
5159 routing_id_, autofill_query_id_, form, value, label)); 5159 routing_id_, autofill_query_id_, form, value, label));
5160 } 5160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698