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

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

Issue 2370923005: Implement restart-required message on Linux. (Closed)
Patch Set: Created 4 years, 2 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) 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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 13 matching lines...) Expand all
24 #include "chrome/common/chrome_features.h" 24 #include "chrome/common/chrome_features.h"
25 #include "chrome/common/chrome_isolated_world_ids.h" 25 #include "chrome/common/chrome_isolated_world_ids.h"
26 #include "chrome/common/chrome_paths.h" 26 #include "chrome/common/chrome_paths.h"
27 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/crash_keys.h" 28 #include "chrome/common/crash_keys.h"
29 #include "chrome/common/pepper_permission_util.h" 29 #include "chrome/common/pepper_permission_util.h"
30 #include "chrome/common/prerender_types.h" 30 #include "chrome/common/prerender_types.h"
31 #include "chrome/common/render_messages.h" 31 #include "chrome/common/render_messages.h"
32 #include "chrome/common/secure_origin_whitelist.h" 32 #include "chrome/common/secure_origin_whitelist.h"
33 #include "chrome/common/url_constants.h" 33 #include "chrome/common/url_constants.h"
34 #include "chrome/grit/chromium_strings.h"
34 #include "chrome/grit/generated_resources.h" 35 #include "chrome/grit/generated_resources.h"
35 #include "chrome/grit/locale_settings.h" 36 #include "chrome/grit/locale_settings.h"
36 #include "chrome/grit/renderer_resources.h" 37 #include "chrome/grit/renderer_resources.h"
37 #include "chrome/renderer/app_categorizer.h" 38 #include "chrome/renderer/app_categorizer.h"
38 #include "chrome/renderer/banners/app_banner_client.h" 39 #include "chrome/renderer/banners/app_banner_client.h"
39 #include "chrome/renderer/benchmarking_extension.h" 40 #include "chrome/renderer/benchmarking_extension.h"
40 #include "chrome/renderer/chrome_render_frame_observer.h" 41 #include "chrome/renderer/chrome_render_frame_observer.h"
41 #include "chrome/renderer/chrome_render_thread_observer.h" 42 #include "chrome/renderer/chrome_render_thread_observer.h"
42 #include "chrome/renderer/chrome_render_view_observer.h" 43 #include "chrome/renderer/chrome_render_view_observer.h"
43 #include "chrome/renderer/content_settings_observer.h" 44 #include "chrome/renderer/content_settings_observer.h"
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 case ChromeViewHostMsg_GetPluginInfo_Status::kComponentUpdateRequired: { 867 case ChromeViewHostMsg_GetPluginInfo_Status::kComponentUpdateRequired: {
867 placeholder = create_blocked_plugin( 868 placeholder = create_blocked_plugin(
868 IDR_BLOCKED_PLUGIN_HTML, 869 IDR_BLOCKED_PLUGIN_HTML,
869 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name)); 870 l10n_util::GetStringFUTF16(IDS_PLUGIN_OUTDATED, group_name));
870 placeholder->AllowLoading(); 871 placeholder->AllowLoading();
871 render_frame->Send(new ChromeViewHostMsg_BlockedComponentUpdatedPlugin( 872 render_frame->Send(new ChromeViewHostMsg_BlockedComponentUpdatedPlugin(
872 render_frame->GetRoutingID(), placeholder->CreateRoutingId(), 873 render_frame->GetRoutingID(), placeholder->CreateRoutingId(),
873 identifier)); 874 identifier));
874 break; 875 break;
875 } 876 }
877 case ChromeViewHostMsg_GetPluginInfo_Status::kRestartRequired: {
878 base::string16 accname_app = l10n_util::GetStringUTF16(IDS_ACCNAME_APP);
Sorin Jianu 2016/09/27 17:59:40 maybe const?
waffles 2016/09/27 22:54:19 Done.
879 placeholder = create_blocked_plugin(
880 IDR_BLOCKED_PLUGIN_HTML,
881 l10n_util::GetStringFUTF16(IDS_PLUGIN_RESTART_REQUIRED,
882 accname_app, group_name));
883 break;
884 }
876 } 885 }
877 } 886 }
878 placeholder->SetStatus(status); 887 placeholder->SetStatus(status);
879 return placeholder->plugin(); 888 return placeholder->plugin();
880 } 889 }
881 #endif // defined(ENABLE_PLUGINS) 890 #endif // defined(ENABLE_PLUGINS)
882 891
883 // For NaCl content handling plugins, the NaCl manifest is stored in an 892 // For NaCl content handling plugins, the NaCl manifest is stored in an
884 // additonal 'nacl' param associated with the MIME type. 893 // additonal 'nacl' param associated with the MIME type.
885 // static 894 // static
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 1468
1460 url::Replacements<char> r; 1469 url::Replacements<char> r;
1461 r.SetPath(path.c_str(), url::Component(0, path.length())); 1470 r.SetPath(path.c_str(), url::Component(0, path.length()));
1462 1471
1463 if (result == internal::NUM_PLUGIN_ERROR) 1472 if (result == internal::NUM_PLUGIN_ERROR)
1464 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS; 1473 result = invalid_url ? internal::SUCCESS_PARAMS_REWRITE : internal::SUCCESS;
1465 1474
1466 RecordYouTubeRewriteUMA(result); 1475 RecordYouTubeRewriteUMA(result);
1467 return corrected_url.ReplaceComponents(r); 1476 return corrected_url.ReplaceComponents(r);
1468 } 1477 }
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | components/component_updater/component_updater_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698