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

Side by Side Diff: chrome/browser/plugins/plugin_observer.cc

Issue 1274383002: Remove deprecated CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP content setting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/content_settings_handler.cc » ('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 (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/browser/plugins/plugin_observer.h" 5 #include "chrome/browser/plugins/plugin_observer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 plugin_name), 411 plugin_name),
412 true); 412 true);
413 } 413 }
414 414
415 void PluginObserver::OnNPAPINotSupported(const std::string& identifier) { 415 void PluginObserver::OnNPAPINotSupported(const std::string& identifier) {
416 #if defined(OS_WIN) && defined(ENABLE_PLUGIN_INSTALLATION) 416 #if defined(OS_WIN) && defined(ENABLE_PLUGIN_INSTALLATION)
417 #if !defined(USE_AURA) 417 #if !defined(USE_AURA)
418 DCHECK(base::win::IsMetroProcess()); 418 DCHECK(base::win::IsMetroProcess());
419 #endif 419 #endif
420 420
421 Profile* profile =
422 Profile::FromBrowserContext(web_contents()->GetBrowserContext());
423 if (profile->IsOffTheRecord())
424 return;
425 HostContentSettingsMap* content_settings =
426 profile->GetHostContentSettingsMap();
427 if (content_settings->GetContentSetting(
428 web_contents()->GetURL(),
429 web_contents()->GetURL(),
430 CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP,
431 std::string()) == CONTENT_SETTING_BLOCK)
432 return;
433
434 scoped_ptr<PluginMetadata> plugin; 421 scoped_ptr<PluginMetadata> plugin;
435 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( 422 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier(
436 identifier, NULL, &plugin); 423 identifier, NULL, &plugin);
437 DCHECK(ret); 424 DCHECK(ret);
438 425
439 PluginMetroModeInfoBarDelegate::Create( 426 PluginMetroModeInfoBarDelegate::Create(
440 InfoBarService::FromWebContents(web_contents()), 427 InfoBarService::FromWebContents(web_contents()),
441 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); 428 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name());
442 #endif 429 #endif
443 } 430 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/content_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698