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

Side by Side Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 24261010: Allow explicitly whitelisted apps/extensions in public sessions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix handing of guest user ID. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/extension_system.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('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/policy/browser_policy_connector.h" 5 #include "chrome/browser/policy/browser_policy_connector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 #if defined(OS_CHROMEOS) 408 #if defined(OS_CHROMEOS)
409 // An empty username means incognito user in case of ChromiumOS and 409 // An empty username means incognito user in case of ChromiumOS and
410 // no logged-in user in case of Chromium (SigninService). Many tests use 410 // no logged-in user in case of Chromium (SigninService). Many tests use
411 // nonsense email addresses (e.g. 'test') so treat those as non-enterprise 411 // nonsense email addresses (e.g. 'test') so treat those as non-enterprise
412 // users. 412 // users.
413 if (user_name.empty() || user_name.find('@') == std::string::npos) 413 if (user_name.empty() || user_name.find('@') == std::string::npos)
414 return USER_AFFILIATION_NONE; 414 return USER_AFFILIATION_NONE;
415 if (install_attributes_ && 415 if (install_attributes_ &&
416 (gaia::ExtractDomainName(gaia::CanonicalizeEmail(user_name)) == 416 (gaia::ExtractDomainName(gaia::CanonicalizeEmail(user_name)) ==
417 install_attributes_->GetDomain() || 417 install_attributes_->GetDomain() ||
418 policy::IsDeviceLocalAccountUser(user_name))) { 418 policy::IsDeviceLocalAccountUser(user_name, NULL))) {
419 return USER_AFFILIATION_MANAGED; 419 return USER_AFFILIATION_MANAGED;
420 } 420 }
421 #endif 421 #endif
422 422
423 return USER_AFFILIATION_NONE; 423 return USER_AFFILIATION_NONE;
424 } 424 }
425 425
426 #if defined(OS_CHROMEOS) 426 #if defined(OS_CHROMEOS)
427 AppPackUpdater* BrowserPolicyConnector::GetAppPackUpdater() { 427 AppPackUpdater* BrowserPolicyConnector::GetAppPackUpdater() {
428 // request_context_ is NULL in unit tests. 428 // request_context_ is NULL in unit tests.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 return new AsyncPolicyProvider(loader.Pass()); 558 return new AsyncPolicyProvider(loader.Pass());
559 } else { 559 } else {
560 return NULL; 560 return NULL;
561 } 561 }
562 #else 562 #else
563 return NULL; 563 return NULL;
564 #endif 564 #endif
565 } 565 }
566 566
567 } // namespace policy 567 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_system.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698