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

Side by Side Diff: chrome/browser/prefs/incognito_mode_prefs.cc

Issue 2870263002: Rename ScopedComPtr::Receive to ScopedComPtr::GetAddressOf (Closed)
Patch Set: Rebase to 2a6f440 Created 3 years, 7 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 | « chrome/browser/platform_util_win.cc ('k') | chrome/browser/speech/tts_win.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/prefs/incognito_mode_prefs.h" 5 #include "chrome/browser/prefs/incognito_mode_prefs.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // Does the work of determining if Windows Parental control activity logging 101 // Does the work of determining if Windows Parental control activity logging
102 // is enabled. 102 // is enabled.
103 static bool IsParentalControlActivityLoggingOnImpl() { 103 static bool IsParentalControlActivityLoggingOnImpl() {
104 base::win::ScopedComPtr<IWindowsParentalControlsCore> parent_controls; 104 base::win::ScopedComPtr<IWindowsParentalControlsCore> parent_controls;
105 HRESULT hr = parent_controls.CreateInstance( 105 HRESULT hr = parent_controls.CreateInstance(
106 __uuidof(WindowsParentalControls)); 106 __uuidof(WindowsParentalControls));
107 if (FAILED(hr)) 107 if (FAILED(hr))
108 return false; 108 return false;
109 109
110 base::win::ScopedComPtr<IWPCSettings> settings; 110 base::win::ScopedComPtr<IWPCSettings> settings;
111 hr = parent_controls->GetUserSettings(nullptr, settings.Receive()); 111 hr = parent_controls->GetUserSettings(nullptr, settings.GetAddressOf());
112 if (FAILED(hr)) 112 if (FAILED(hr))
113 return false; 113 return false;
114 114
115 unsigned long restrictions = 0; 115 unsigned long restrictions = 0;
116 settings->GetRestrictions(&restrictions); 116 settings->GetRestrictions(&restrictions);
117 117
118 return (restrictions & WPCFLAG_LOGGING_REQUIRED) == 118 return (restrictions & WPCFLAG_LOGGING_REQUIRED) ==
119 WPCFLAG_LOGGING_REQUIRED; 119 WPCFLAG_LOGGING_REQUIRED;
120 } 120 }
121 121
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 bool valid = IntToAvailability(pref_value, &result); 228 bool valid = IntToAvailability(pref_value, &result);
229 DCHECK(valid); 229 DCHECK(valid);
230 if (result != IncognitoModePrefs::DISABLED && 230 if (result != IncognitoModePrefs::DISABLED &&
231 mode == CHECK_PARENTAL_CONTROLS && ArePlatformParentalControlsEnabled()) { 231 mode == CHECK_PARENTAL_CONTROLS && ArePlatformParentalControlsEnabled()) {
232 if (result == IncognitoModePrefs::FORCED) 232 if (result == IncognitoModePrefs::FORCED)
233 LOG(ERROR) << "Ignoring FORCED incognito. Parental control logging on"; 233 LOG(ERROR) << "Ignoring FORCED incognito. Parental control logging on";
234 return IncognitoModePrefs::DISABLED; 234 return IncognitoModePrefs::DISABLED;
235 } 235 }
236 return result; 236 return result;
237 } 237 }
OLDNEW
« no previous file with comments | « chrome/browser/platform_util_win.cc ('k') | chrome/browser/speech/tts_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698