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

Unified Diff: chromeos/network/policy_applicator.cc

Issue 552113002: Add ONC 'Source' configuration property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_279351_internet_options_9a
Patch Set: Add ONC_SOURCE_UNKNOWN Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/policy_applicator.cc
diff --git a/chromeos/network/policy_applicator.cc b/chromeos/network/policy_applicator.cc
index bd81d7db1fc2bca84c616a14d244e4f8570b5219..34ece8d6d227e1c2fbf5e5118fd7f2f5d976f5ea 100644
--- a/chromeos/network/policy_applicator.cc
+++ b/chromeos/network/policy_applicator.cc
@@ -110,9 +110,14 @@ void PolicyApplicator::GetEntryCallback(
VLOG(2) << "Received properties for entry " << entry << " of profile "
<< profile_.ToDebugString();
+ scoped_ptr<NetworkUIData> ui_data =
+ shill_property_util::GetUIDataFromProperties(entry_properties);
+
+ ::onc::ONCSource onc_source =
+ ui_data ? ui_data->onc_source() : ::onc::ONC_SOURCE_UNKNOWN;
scoped_ptr<base::DictionaryValue> onc_part(
- onc::TranslateShillServiceToONCPart(entry_properties,
- &onc::kNetworkWithStateSignature));
+ onc::TranslateShillServiceToONCPart(
+ entry_properties, onc_source, &onc::kNetworkWithStateSignature));
pneubeck (no reviews) 2014/09/10 20:22:38 you could always pass ONC_SOURCE_UNKNOWN as 'Sourc
stevenjb 2014/09/10 22:42:01 Done.
std::string old_guid;
if (!onc_part->GetStringWithoutPathExpansion(::onc::network_config::kGUID,
@@ -123,8 +128,6 @@ void PolicyApplicator::GetEntryCallback(
// unmanaged.
}
- scoped_ptr<NetworkUIData> ui_data =
- shill_property_util::GetUIDataFromProperties(entry_properties);
if (!ui_data) {
VLOG(1) << "Entry " << entry << " of profile " << profile_.ToDebugString()
<< " contains no or no valid UIData.";

Powered by Google App Engine
This is Rietveld 408576698