summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/proxy_config_service_impl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge FavoriteState into NetworkStatestevenjb@chromium.org2014-06-121-4/+3
| | | | | | | | | | | | BUG=375955 For trivial renaming: R=armansito@chromium.org, pneubeck@chromium.org TBR=derat@chromium.org, xiyuan@chromium.org Review URL: https://codereview.chromium.org/289383004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276822 0039d316-1c4b-4281-b951-d872f2087c98
* [cros login] Split login related classes into subfolders.nkostylev@chromium.org2014-05-161-1/+1
| | | | | | | | | | | | | | | | | | | auth: local auth i.e. cryptohome related lock: screen lock signin: browser signin related such as OAuth2* users: user management users/avatar: user avatars (profile pictures) users/wallpaper: user wallpapers ui: login/lock dialogs/host/view etc. BUG=370175 TEST=existing tests, presubmit hooks TBR=benwells Review URL: https://codereview.chromium.org/286933002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270898 0039d316-1c4b-4281-b951-d872f2087c98
* Disable noisy printf in proxy_config_handler.cc and proxy_config_service_impl.ccdanakj@chromium.org2014-02-051-2/+2
| | | | | | | | | | | | These are printed in every browser test, and just adds noise. Switch them to VLOG(1) so they're available when wanted. R=davemoore BUG=339891 Review URL: https://codereview.chromium.org/143353003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249152 0039d316-1c4b-4281-b951-d872f2087c98
* Split the BrowserPolicyConnector into platform parts.joaodasilva@chromium.org2014-01-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BrowserPolicyConnector is the class that instantiates the rest of the policy code and wires it up to the rest of the browser (e.g. by overriding local state prefs at the BrowserProcessImpl). It also hosts some utilities and other central components. That class has grown over time and contains many platform-specific parts; it also had chrome-specific code that can't be used on iOS. This change breaks the class into 3 pieces: - the new BrowserPolicyConnector is the base class and lives in the component, so that an iOS subclass can be created in a subsequent CL. This is what g_browser_process holds now. - chrome/browser/policy contains ChromeBrowserPolicyConnector which overrides it and provides Chrome-specific initialization. - chrome/browser/chromeos/policy contains BrowserPolicyConnectorChromeOS which inherits from ChromeBrowserPolicyConnector and adds ChromeOS-specific components. ChromeBrowserPolicyConnector and the future BrowserPolicyConnectorIos only add configuration and no new methods, so the base class available from g_browser_process covers all current uses. BrowserPolicyConnectorChromeOS has methods that are needed on ChromeOS, and can now be obtained via g_browser_process->platform_parts()->browser_policy_connector_chromeos(). This CL doesn't make any functional changes; no behavior should be changed at all. BUG=275292 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/141133003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246087 0039d316-1c4b-4281-b951-d872f2087c98
* Move policy code into components/policy.joaodasilva@chromium.org2013-12-081-1/+1
| | | | | | | | | | | | | | | | | | The code moved to component/policy can be included on iOS, but can't depend on chrome/. This move includes an exception for the policy protobufs: - the generic cloud policy protobufs will be moved into a new repository, due to a dependency from a ChromeOS package - the user cloud policy protobuf and its decoding will move into a new component for user policy BUG=271392 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/109743002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239399 0039d316-1c4b-4281-b951-d872f2087c98
* Moved onc_constants.* from chromeos/network/onc to components/onc.mef@chromium.org2013-10-081-4/+4
| | | | | | | | BUG=267667 Review URL: https://codereview.chromium.org/24600003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227495 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor access to the ONC policy for a network.pneubeck@chromium.org2013-10-011-5/+5
| | | | | | | | | | | | | | | | | Instead of relying on a value stored in Shill (namely, onc_source in UIData) and caching that in NetworkState, directly access the new ONC preference in Chrome to check whether a network is managed or not. Proxy settings worked already in that way. With this change internet_options_handler uses the same code path. The only functional change is that a policy indicator will also be visible in the NetworkList of chrome://settings if Ethernet is managed. BUG=126870 (for API changes; network_state_informer.cc, preferences_browsertest.cc) R=bartfab@chromium.org, stevenjb@chromium.org TBR=nkostylev@chromium.org, ygorshenin@chromium.org Review URL: https://codereview.chromium.org/23609047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226237 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeOS: Add a per user and a local state network preference.pneubeck@chromium.org2013-07-221-28/+44
| | | | | | | | | | | | | | | - Adds a network preference kOpenNetworkProperties to user prefs. - Adds a network preference kDeviceOpenNetworkProperties to local state. - Both are lists of NetworkConfigurations according to the ONC spec. - For now, only policies are written to these prefs. - User settings continue to be stored in Shill for now. A follow up commit will change that too. BUG=258835 TBR=mpcomplete@chromium.org (trivial change in chrome_direct_setting_api.h) Review URL: https://chromiumcodereview.appspot.com/18348012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212872 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup the UseSharedProxies preference.pneubeck@chromium.org2013-07-171-52/+28
| | | | | | | | | | | | | | | - remove the UserSharedProxies pref from local state - fix the default value of the pref in the profile pref service - make the conditionals, when to use or ignore proxy settings, more explicit and clearer. BUG=258835 TEST=Manually checked all combinations of {DevicePolicy, UserPolicy, SharedNetwork, NotSharedNetwork} x {before, after login} x {enabled, disabled UseSharedProxies} for proxies of the system context, signin profile and user's profile. I checked the proxies by looking at the vlogs and the UI (like net-internals and settings page). I did not test the actual network connectivity of each context. TBR=battre@chromium.org, nkostylev@chromium.org Review URL: https://codereview.chromium.org/18112018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211954 0039d316-1c4b-4281-b951-d872f2087c98
* Allow Chrome OS login profile to have different default pref valuesbartfab@chromium.org2013-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This CL is a prerequisite for putting Chrome in charge of all power management settings. Since the power management defaults on the login screen differ from those during a user session, the default values of the power prefs should be set differently for the login profile. This CL has no functional changes. It just does the following: 1/ Split chrome::RegisterUserPrefs() into: * chrome::RegisterUserProfilePrefs() * chrome::RegisterLoginProfilePrefs() 2/ Rename all other RegisterUserPrefs() methods to RegisterProfilePrefs(). BUG=241794 TEST=Updated unit and browser tests TBR=jochen@chromium.org (blanket rename of RegisterUserPrefs() in chrome/) TBR=asargent@chromium.org (blanket rename of RegisterUserPrefs() in apps/) TBR=joi@chromium.org (blanket rename of RegisterUserPrefs() in components/) Review URL: https://chromiumcodereview.appspot.com/18199003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210310 0039d316-1c4b-4281-b951-d872f2087c98
* Log NetworkStateHandler::AddObserverstevenjb@chromium.org2013-06-141-3/+6
| | | | | | | | | | | | | | This will help debug code that appears to stop receiving network updates e.g. networking_private_event_router.cc by logging when classes add and remove observers. BUG=247229 For chrome/browser/ui/webui/chromeos/login/: TBR=xiyuan@chromium.org Review URL: https://chromiumcodereview.appspot.com/16816006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206301 0039d316-1c4b-4281-b951-d872f2087c98
* Extract common per-network proxy configuration functions.pneubeck@chromium.org2013-06-101-9/+10
| | | | | | | | | | | | | | | | | - Extracted functions to get and set per-network proxy configuration from ProxyConfigServiceImpl, UIProxyConfigService and NetworkStateInformer, and moved them to a common place (chrome/browser/chromeos/net/proxy_config_handler.h). - The previous SetProxyConfig call to NetworkLibrary was extracted and instead ShillServiceClient is called directly. - Now uses NetworkStateHandler and NetworkState instead of NetworkLibrary to get the current proxy config. - This removed any dependency of proxy UI on NetworkLibrary. BUG=234982 R=mnissler@chromium.org, nkostylev@chromium.org, stevenjb@chromium.org Review URL: https://codereview.chromium.org/16398005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205214 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ownership of proxy UI related state.pneubeck@chromium.org2013-06-071-5/+0
| | | | | | | | | | | | - stores proxy UI related state in the CoreChromeOSOptionsHandler, i.e. per open settings page. - removes any dependency of ProxyConfigServiceImpl on proxy UI. BUG=142370, 234982 Review URL: https://chromiumcodereview.appspot.com/15847003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204853 0039d316-1c4b-4281-b951-d872f2087c98
* Migrate ProxyConfigServiceImpl to NetworkStateHandler and NetworkProfileHandler.pneubeck@chromium.org2013-06-041-597/+120
| | | | | | | | | | | | | - UI part of ProxyConfigServiceImpl is moved to UIProxyConfig and UIProxyConfigService. - ProxyConfigServiceImpl uses NetworkStateHandler instead of NetworkLibrary except for the legacy migration of device proxy settings. - UI code continues to use NetworkLibrary for now. BUG=234982 TBR=willchan@chromium.org (for trivial but reviewed change in net/proxy/proxy_config.*) Review URL: https://chromiumcodereview.appspot.com/14846004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204016 0039d316-1c4b-4281-b951-d872f2087c98
* NetworkPortalDetector/NetworkStateInformer: Switch over to use ↵gauravsh@chromium.org2013-05-221-5/+6
| | | | | | | | | | | | | | | | | | | | NetworkStateHandler [reland of 200968 after nkostylev's fix to remove the NOTREACHED in WebUIScreenLocker::IsSigninProgress crbug.com/241548] This removes the direct network library dependency for NetworkPortalDetector, NetworkStateInformer, and SigninScreenHandler. UpdateScreen and LocallyManagedUserCreationHandler no longer depend on NetworkLibrary as well. Also change active -> default network in these to be consistent with terminology we use in NetworkStateHandler. BUG=189093,189009 Review URL: https://chromiumcodereview.appspot.com/15359008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201400 0039d316-1c4b-4281-b951-d872f2087c98
* Remove migration code from device proxy settings to per network settings.pneubeck@chromium.org2013-05-211-167/+2
| | | | | | | | | | | | | | | Also - removed the then unused Pref kSettingProxyEverywhere. - removed some unused debugging code from ProxyConfigServiceImpl. This shouldn't affect the device proxy policy, as it is still converted to the policy kProxySettings. BUG=168140 TEST=Ensure that device proxy policy still works for retail mode v1. Review URL: https://chromiumcodereview.appspot.com/15269004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201330 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup NetworkPropertyUIData.pneubeck@chromium.org2013-05-211-2/+2
| | | | | | | | | | This removes the dependency on NetworkUIData. BUG=NONE Review URL: https://chromiumcodereview.appspot.com/15297002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201298 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 200968 "NetworkPortalDetector/NetworkStateInformer: Switc..."tapted@chromium.org2013-05-201-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recurring interactive_ui_tests failure on debug CrOS bot: ScreenLockerTest.TestBasic: [19220:19220:0518/024626:1396652721:FATAL:webui_screen_locker.cc(208)] Check failed: false. chromeos::WebUIScreenLocker::IsSigninInProgress() chromeos::WebUILoginDisplay::IsSigninInProgress() chromeos::SigninScreenHandler::UpdateStateInternal() chromeos::SigninScreenHandler::UpdateState() chromeos::NetworkStateInformer::SendStateToObservers() chromeos::NetworkStateInformer::UpdateStateAndNotify() > NetworkPortalDetector/NetworkStateInformer: Switch over to use NetworkStateHandler > > This removes the direct network library dependency for NetworkPortalDetector, > NetworkStateInformer, and SigninScreenHandler. UpdateScreen and > LocallyManagedUserCreationHandler no longer depend on NetworkLibrary as well. > > Also change active -> default network in these to be consistent with > terminology we use in NetworkStateHandler. > > BUG=189093,189009 > > Review URL: https://chromiumcodereview.appspot.com/14134007 TBR=gauravsh@chromium.org Review URL: https://codereview.chromium.org/15421003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201004 0039d316-1c4b-4281-b951-d872f2087c98
* NetworkPortalDetector/NetworkStateInformer: Switch over to use ↵gauravsh@chromium.org2013-05-181-5/+6
| | | | | | | | | | | | | | | | | NetworkStateHandler This removes the direct network library dependency for NetworkPortalDetector, NetworkStateInformer, and SigninScreenHandler. UpdateScreen and LocallyManagedUserCreationHandler no longer depend on NetworkLibrary as well. Also change active -> default network in these to be consistent with terminology we use in NetworkStateHandler. BUG=189093,189009 Review URL: https://chromiumcodereview.appspot.com/14134007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200968 0039d316-1c4b-4281-b951-d872f2087c98
* components: Move PrefRegistrySyncable into user_prefs namespace.tfarina@chromium.org2013-05-061-4/+6
| | | | | | | | | | BUG=180785 R=joi@chromium.org TBR=darin@chromium.org Review URL: https://chromiumcodereview.appspot.com/14622003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198384 0039d316-1c4b-4281-b951-d872f2087c98
* Move proto files back into chrome/browser/policy/protomnissler@chromium.org2013-04-261-1/+1
| | | | | | | | | | | | | | | The chrome/browser/policy/proto.git repo was broken due to the moves, and pulling proto files from several paths in the Chrome tree into the Chrome OS build adds complexity. Hence, move back the proto files to chrome/browser/policy/proto/{cloud,chromeos}. BUG=None TEST=Compiles and passes tests. TBR=sky@chromium.org, nkostylev@chromium.org Review URL: https://codereview.chromium.org/14008005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196698 0039d316-1c4b-4281-b951-d872f2087c98
* Moving ManagedNetworkConfigurationHandler to chromeos/.pneubeck@chromium.org2013-04-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also moving the dependencies of the handler to chromeos/: NetworkUIData from chrome/browser/chromeos/cros/network_ui_data* to chromeos/network/network_ui_data* NetworkPropertyUIData from chrome/browser/chromeos/cros/network_ui_data* to chrome/browser/chromeos/cros/network_property_ui_data* CreateNetworkUIData from chrome/browser/chromeos/net/onc_utils* to chromeos/network/network_ui_data* CertificatePattern from chrome/browser/chromeos/cros/certificate_pattern* to chromeos/network/certificate_pattern* Certificate pattern matching (was a member function of CertificatePatern) from chrome/browser/chromeos/cros/certificate_pattern* to chrome/browser/chromeos/cros/certificate_pattern_matcher* The only implementation change is in network_ui_data.cc in order to break dependency on EnumMapper. NetworkUIData and CertificatePattern are data keeping classes only, and will eventually be replaced by ONC. However, we need them for backwards compatibility for a while. BUG=180711 Review URL: https://chromiumcodereview.appspot.com/13454006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193364 0039d316-1c4b-4281-b951-d872f2087c98
* For managed users, enforce proxy settings of device policy configured networks.pneubeck@chromium.org2013-03-281-0/+25
| | | | | | | | | | | | | Previously, these users had to check 'Allow proxies for shared networks' which has the side-effect of allowing proxies also for networks shared with other device users. Now, these users get the proxies of the device policy automatically without requiring any action. BUG=221795 TEST=Setup a device policy network with proxy settings. Log in. Connect to that network. Check the proxy settings on net-internals. Do the same with a non-managed user and ensure that proxy is not active. Review URL: https://chromiumcodereview.appspot.com/13004008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191211 0039d316-1c4b-4281-b951-d872f2087c98
* Change ProxyRules to handle ProxyLists rather than just single ProxyServer ↵marq@google.com2013-03-161-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | instances. - All of the ProxyRules members that used to just be ProxyServers are now ProxyLists. - ParseFromString will now accept multiple proxy specifications per scheme. - ProxyRules::Apply now sets the ProxyInfo result to use a PAC string if any proxying will be done. - ProxyList now has an AddProxyServer method. - In general, beacuse ProxyList checks for the validity of its contents before adding new entries, IsEmpty() is used as a validity test where is_valid() used to be. - Writing ProxyRules into a dictionary will write out each constituent ProxyList as a PAC string. - Slight functional change to proxy_info: Calling UsePacString() now invokes Reset(), in line with the other Use* methods. - Updated proxy_config_unittest to compare PAC strings of proxy rules components. BUG= Review URL: https://chromiumcodereview.appspot.com/12315019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188604 0039d316-1c4b-4281-b951-d872f2087c98
* Move policy protocol buffer definitions next to code that needs them.mnissler@chromium.org2013-03-141-1/+1
| | | | | | | | | | | | | | | Remove the chrome/browser/policy/proto directory and move the contents to chrome/browser/policy/cloud/proto and chrome/browser/chromeos/policy/proto, respectively. Split the gyp rules to reflect that structure so unneeded protos are not compiled on configurations that don't need them. BUG=None TEST=Compiles and passes tests. Review URL: https://codereview.chromium.org/12231003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188065 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce //components/user_prefs.joi@chromium.org2013-03-061-1/+1
| | | | | | | | | | | | | | | | | | The user_prefs component provides: a) The UserPrefs class, used to map PrefService objects to BrowserContext. This addresses a TODO to get rid of PrefServiceFromBrowserContext from base/prefs/pref_service.h, where clearly a mention of a content class did not belong. b) A place for PrefRegistrySyncable to live, where it can be used by components that need to register prefs. We also use (b) in this change to eliminate Autofill's dependency on chrome/browser/prefs. Work is ongoing to move Autofill to //components/autofill. TBR=ben@chromium.org BUG=155525,140037 Review URL: https://chromiumcodereview.appspot.com/12340111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186301 0039d316-1c4b-4281-b951-d872f2087c98
* Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/.joi@chromium.org2013-02-111-2/+2
| | | | | | | | | | | | | | This is a mostly-automated change, using ./tools/git/move_source_file.py to move files and fix up include guards and #includes from other files. Manual edits were limited to fixing up .gypi files and adding BASE_PREFS_EXPORT where needed. TBR=ben@chromium.org BUG=155525 Review URL: https://codereview.chromium.org/12211105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181707 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable.joi@chromium.org2013-02-101-5/+5
| | | | | | | | | | | Minimize usage of PrefServiceSyncable. It is mostly an implementation detail of ProfileImpl and the sync integration. TBR=ben@chromium.org BUG=155525 Review URL: https://codereview.chromium.org/12079097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181648 0039d316-1c4b-4281-b951-d872f2087c98
* Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple.joi@chromium.org2013-02-061-2/+3
| | | | | | | | | | | | This is a step towards removing registration methods from PrefService and simplifying its class hierarchy. TBR=ben@chromium.org BUG=155525 Review URL: https://chromiumcodereview.appspot.com/11741003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180873 0039d316-1c4b-4281-b951-d872f2087c98
* This adds Cellular to the Shill to ONC translation.gspencer@chromium.org2013-01-231-1/+1
| | | | | | | | | | | | | It also populates the Name property when translating from Shill to ONC, and adds a ConnectionState property in ONC that indicates the current connection state of the network. (TBR'ing OWNERS because it's just refactoring: moving symbols into more specific namespaces) TBR=zelidrag@chromium.org,glotov@chromium.org,mnissler@chromium.org BUG=none Review URL: https://chromiumcodereview.appspot.com/11962048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178228 0039d316-1c4b-4281-b951-d872f2087c98
* Extending the translation from ONC to Shill.pneubeck@chromium.org2013-01-111-3/+3
| | | | | | | | | | | | Added string expansion and UIData creation. BUG=162040,147624 TBR=jochen@chromium.org (for gypi changes) Review URL: https://chromiumcodereview.appspot.com/11664005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176312 0039d316-1c4b-4281-b951-d872f2087c98
* Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable.joi@chromium.org2012-12-221-2/+8
| | | | | | | | | | | | | | | | | | | | | The first two (PrefServiceSimple is a subclass of PrefService) know nothing about sync or any Chrome or content concepts. The third (PrefServiceSyncable, a separate subclass of PrefService) knows about sync and requires users to choose whether each individual preference is syncable or not when it is registered. BrowserProcess::local_state() is a PrefServiceSimple after this change, and Profile::prefs() is a PrefServiceSyncable. COLLABORATOR=kaiwang@chromium.org TBR=ben@chromium.org BUG=155525 Review URL: https://chromiumcodereview.appspot.com/11570009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174531 0039d316-1c4b-4281-b951-d872f2087c98
* This moves the ONC parsing code into chromeos/network/oncgspencer@chromium.org2012-12-111-1/+1
| | | | | | | | | | | | | | | | so that it can be used there without violating dependency rules. (Using the "refactoring" OWNERS TBR rule...) BUG=none TEST=ran unit tests TBR=jhawkins@chromium.org Review URL: https://chromiumcodereview.appspot.com/11299236 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172446 0039d316-1c4b-4281-b951-d872f2087c98
* Remove PrefObserver usages, batch 5.joi@chromium.org2012-11-151-19/+16
| | | | | | | | | | TBR=cbentzel@chromium.org,achuith@chromium.org,bauerb@chromium.org,jhawkins@chromium.org,ivankr@chromium.org BUG=155525 Review URL: https://chromiumcodereview.appspot.com/11359209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167916 0039d316-1c4b-4281-b951-d872f2087c98
* Remove content::NotificationObserver dependency from most Prefs code.joi@chromium.org2012-11-011-20/+17
| | | | | | | | | | | | | | | | | | | | | Instead of using content::NotificationObserver, introduce specific type-safe observer classes and update users to use them. In a very large number of cases this was the users' only reason for being a content::NotificationObserver and they would have a lot of boiler-plate code such as a DCHECK on the notification type and unpacking of the generic NotificationDetails types, so this change removes a bunch of boilerplate and introduces more type safety. This is part of enabling more of the Prefs code to live in base/prefs/. TBR=ben@chromium.org,brettw@chromium.org BUG=155525 Review URL: https://chromiumcodereview.appspot.com/11345008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165414 0039d316-1c4b-4281-b951-d872f2087c98
* Added NetworkPortalDetector.ygorshenin@chromium.org2012-10-301-10/+18
| | | | | | | | | | | | BUG=134206 TEST=Manual tests on an Alex device. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=164756 Review URL: https://chromiumcodereview.appspot.com/10981067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164894 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 164756 - Added NetworkPortalDetector.xusydoc@chromium.org2012-10-301-18/+10
| | | | | | | | | | | | | BUG=134206 TEST=Manual tests on an Alex device. Review URL: https://chromiumcodereview.appspot.com/10981067 TBR=ygorshenin@chromium.org Review URL: https://codereview.chromium.org/11346026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164822 0039d316-1c4b-4281-b951-d872f2087c98
* Added NetworkPortalDetector.ygorshenin@chromium.org2012-10-291-10/+18
| | | | | | | | | | BUG=134206 TEST=Manual tests on an Alex device. Review URL: https://chromiumcodereview.appspot.com/10981067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164756 0039d316-1c4b-4281-b951-d872f2087c98
* Renaming instances of "flimflam" with "shill", now that we're only using shill.gspencer@chromium.org2012-09-071-3/+3
| | | | | | | | | | | | | | | Does not rename things from the flimflam:: namespace in service_constants.h: that will be saved for a later pass. I think this counts as refactoring, so I'm TBR'ing the OWNERS checks. TBR=zelidrag@chromium.org,glotov@chromium.org BUG=chromium:146616 TEST=built and ran Review URL: https://chromiumcodereview.appspot.com/10915106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155477 0039d316-1c4b-4281-b951-d872f2087c98
* Move Chrome OS device settings stuff to chrome/browser/chromeos/settings.mnissler@chromium.org2012-08-011-2/+2
| | | | | | | | | | BUG=chromium:139126 TEST=Still compiles and passes tests, no functional changes. TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10824112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149399 0039d316-1c4b-4281-b951-d872f2087c98
* Demote LOG(WARNING) to VLOG(1) for an error message that is rather ↵pastarmovj@chromium.org2012-06-251-42/+40
| | | | | | | | | | | | | | | | | | informational. The error message is shown on almost every chromeos boot because this policy is set to something only very rarely. Therefore this is not really an error state but rather normal operational state. Drive by: Cleaned up the rest of the VLOGs spread around the file. BUG=112770 TEST=Less log abuse. Review URL: https://chromiumcodereview.appspot.com/10666024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143906 0039d316-1c4b-4281-b951-d872f2087c98
* Change the PrepareTrustedValues interface to return more information on the ↵pastarmovj@chromium.org2012-05-251-5/+8
| | | | | | | | | | | | query. BUG=chromium-os:31173 TEST=unit_tests,browser_tests Review URL: https://chromiumcodereview.appspot.com/10421038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139035 0039d316-1c4b-4281-b951-d872f2087c98
* Replace CrosSettings::GetTrusted() with PrepareTrustedValues().joaodasilva@chromium.org2012-03-201-2/+1
| | | | | | | | | | | | This makes the API clearer about what values can be regarded as trusted. BUG=None TEST=All works as before Review URL: http://codereview.chromium.org/9731004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127681 0039d316-1c4b-4281-b951-d872f2087c98
* Renaming virtual setters/getters in UserManager.nkostylev@chromium.org2012-03-061-2/+4
| | | | | | | | | | | | | | | | | | Follow up CL for http://codereview.chromium.org/9348022/ * Renamed unix_hacker to CamelStyle methods from UserManager as they are not non-virtual getters and setters any more. - user_is_logged_in() - logged_in_user() - current_user_is_owner() / set_current_user_is_owner() - current_user_is_new() - downloaded_profile_image() BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/9355059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125230 0039d316-1c4b-4281-b951-d872f2087c98
* Break two classes defined in json_value_serializer.cc, .h into separate files.bbudge@chromium.org2012-02-261-1/+1
| | | | | | | | | This will allow the use of JSONStringValueSerializer in the NaCl sandbox. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9465030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123701 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Lock proxy settings UI for policy managed network.xiyuan@chromium.org2012-02-171-2/+26
| | | | | | | | | | BUG=chromium-os:24284 TEST=Verify fix for chromium-os:24284. Review URL: http://codereview.chromium.org/9401020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122604 0039d316-1c4b-4281-b951-d872f2087c98
* Do not explicitly store mode:direct value for proxyantrim@chromium.org2012-02-161-4/+15
| | | | | | | | | | | | | | | | | in chrome/browser/prefs/proxy_config_dictionary: Made it possible to find out current mode while having only DictionaryValue (without creating ProxyConfigDictionary on top of it) in chrome/browser/chromeos/cros/network_library and chrome/browser/chromeos/proxy_config_service_impl: Serialize DictionaryValue to empty string instead of {"mode":"direct"} as well as do not store ProxyConfigProperty if it is empty. BUG=chromium-os:24550 TEST=manual check (change proxy in ui to manual with some text in HTTP proxy, then switch back to Direct Internet Connection / make sure portal is working) Review URL: http://codereview.chromium.org/9323003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122275 0039d316-1c4b-4281-b951-d872f2087c98
* Quick-and-dirty hacks for getting policy working behind proxies.xiyuan@chromium.org2012-02-011-2/+2
| | | | | | | | | | | | | | | | | | | This is check-in for mattias. Original review: http://codereview.chromium.org/9315011/ Note that this hard-wires policy OAuth fetching in login_utils.cc to the authentication profile. I'm not entirely sure this is a good idea, but required since the user profile isn't in a state to allow successful requests at this point (the use-shared-proxies flag is off). Other stuff in login_utils.cc might need the hack too (sync?). BUG=chromium-os:25703 TEST=Verify fix for chromium-os:25703 TBR=mnissler@chromium.org,zelidrag@chromium.org,sumit@chromium.org,pastarmovj@chromium.org,kuan@chromium.org Review URL: https://chromiumcodereview.appspot.com/9309024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120013 0039d316-1c4b-4281-b951-d872f2087c98
* fix bug where proxy setting of private version of network is not activated whenkuan@chromium.org2011-12-201-20/+12
| | | | | | | | | | | it replaces its shared version. BUG=chromium-os:23834 TEST=verify per bug rpt. Review URL: http://codereview.chromium.org/8970010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115152 0039d316-1c4b-4281-b951-d872f2087c98
* PART 5 Of the signed settings refactoring. List of all changes follow beneath:pastarmovj@chromium.org2011-12-021-37/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read from the bottom to the top: * Add new unit tests to cover what was removed before. * Rename SignedSettingsTempStorage to SignedSettingsCache. * Revitalize existing tests for SignedSettings[Helper]. * Add the needed infrastucture to support enrollment as well. * Remove the second cache in OwnershipService it is obsolete. * Remove the prop ops completely. * Remove direct prop op from the proxy stuff. * Serialize policy changes correctly and map side effects of policies. Mainly make sure we never serialize dirty policy. Don't reload if policy is serialized fine. Clear local state registration. * Clean up redundand SS ops and make proper callbacks for the helper Move the temp storage finalization to where it belongs. * Make the temp storage be the cache and use policy ops. * Make DeviceSettingsProvider work with the protobuf blob directly. * Merged DeviceSettingsProvider and UserCrosSettingsTrust. * Rename UserCrosSettingsProvider to DeviceSettingsProvider. * Extract the SignedSettingsMigrationHelper in its own file. BUG=chromium-os:14054 TEST=unit_tests:SignedSettings*,*CrosSettings*,suite_Smoke:login_OwnershipApi Review URL: http://codereview.chromium.org/8727037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112713 0039d316-1c4b-4281-b951-d872f2087c98