diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 19:42:19 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 19:42:19 +0000 |
commit | 0c6c1e43289fc2e225a6c824aff40c9b63b5df78 (patch) | |
tree | 9ab1034e260c5887ecc7a70cd112cef97458582a /sync | |
parent | ae0c0f6af00c25b6c41c9e37e8cb849de9a9a680 (diff) | |
download | chromium_src-0c6c1e43289fc2e225a6c824aff40c9b63b5df78.zip chromium_src-0c6c1e43289fc2e225a6c824aff40c9b63b5df78.tar.gz chromium_src-0c6c1e43289fc2e225a6c824aff40c9b63b5df78.tar.bz2 |
Add base namespace to more values in sync and elsewhere.
This makes sync and net compile with no "using *Value".
BUG=
Review URL: https://codereview.chromium.org/17034006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207907 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
42 files changed, 145 insertions, 138 deletions
diff --git a/sync/api/sync_change_unittest.cc b/sync/api/sync_change_unittest.cc index b989e41..4c23c77 100644 --- a/sync/api/sync_change_unittest.cc +++ b/sync/api/sync_change_unittest.cc @@ -47,8 +47,8 @@ TEST_F(SyncChangeTest, LocalUpdate) { EXPECT_EQ(tag, e.sync_data().GetTag()); EXPECT_EQ(title, e.sync_data().GetTitle()); EXPECT_EQ(PREFERENCES, e.sync_data().GetDataType()); - scoped_ptr<DictionaryValue> ref_spec(EntitySpecificsToValue(specifics)); - scoped_ptr<DictionaryValue> e_spec(EntitySpecificsToValue( + scoped_ptr<base::DictionaryValue> ref_spec(EntitySpecificsToValue(specifics)); + scoped_ptr<base::DictionaryValue> e_spec(EntitySpecificsToValue( e.sync_data().GetSpecifics())); EXPECT_TRUE(ref_spec->Equals(e_spec.get())); } @@ -67,8 +67,8 @@ TEST_F(SyncChangeTest, LocalAdd) { EXPECT_EQ(tag, e.sync_data().GetTag()); EXPECT_EQ(title, e.sync_data().GetTitle()); EXPECT_EQ(PREFERENCES, e.sync_data().GetDataType()); - scoped_ptr<DictionaryValue> ref_spec(EntitySpecificsToValue(specifics)); - scoped_ptr<DictionaryValue> e_spec(EntitySpecificsToValue( + scoped_ptr<base::DictionaryValue> ref_spec(EntitySpecificsToValue(specifics)); + scoped_ptr<base::DictionaryValue> e_spec(EntitySpecificsToValue( e.sync_data().GetSpecifics())); EXPECT_TRUE(ref_spec->Equals(e_spec.get())); } @@ -110,9 +110,9 @@ TEST_F(SyncChangeTest, SyncerChanges) { SyncChange e = change_list[0]; EXPECT_EQ(SyncChange::ACTION_UPDATE, e.change_type()); EXPECT_EQ(PREFERENCES, e.sync_data().GetDataType()); - scoped_ptr<DictionaryValue> ref_spec(EntitySpecificsToValue( + scoped_ptr<base::DictionaryValue> ref_spec(EntitySpecificsToValue( update_specifics)); - scoped_ptr<DictionaryValue> e_spec(EntitySpecificsToValue( + scoped_ptr<base::DictionaryValue> e_spec(EntitySpecificsToValue( e.sync_data().GetSpecifics())); EXPECT_TRUE(ref_spec->Equals(e_spec.get())); diff --git a/sync/api/sync_data.cc b/sync/api/sync_data.cc index e95a2df..8df5eae 100644 --- a/sync/api/sync_data.cc +++ b/sync/api/sync_data.cc @@ -121,7 +121,8 @@ std::string SyncData::ToString() const { std::string type = ModelTypeToString(GetDataType()); std::string specifics; - scoped_ptr<DictionaryValue> value(EntitySpecificsToValue(GetSpecifics())); + scoped_ptr<base::DictionaryValue> value( + EntitySpecificsToValue(GetSpecifics())); base::JSONWriter::WriteWithOptions(value.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &specifics); diff --git a/sync/engine/traffic_logger.cc b/sync/engine/traffic_logger.cc index 740409a..13b1c64 100644 --- a/sync/engine/traffic_logger.cc +++ b/sync/engine/traffic_logger.cc @@ -18,10 +18,10 @@ namespace syncer { namespace { template <class T> void LogData(const T& data, - DictionaryValue* (*to_dictionary_value)(const T&, bool), + base::DictionaryValue* (*to_dictionary_value)(const T&, bool), const std::string& description) { if (::logging::DEBUG_MODE && VLOG_IS_ON(1)) { - scoped_ptr<DictionaryValue> value( + scoped_ptr<base::DictionaryValue> value( (*to_dictionary_value)(data, true /* include_specifics */)); std::string message; base::JSONWriter::WriteWithOptions(value.get(), diff --git a/sync/engine/traffic_recorder.cc b/sync/engine/traffic_recorder.cc index 0e19aaa..d3f2347 100644 --- a/sync/engine/traffic_recorder.cc +++ b/sync/engine/traffic_recorder.cc @@ -61,10 +61,10 @@ const char* GetMessageTypeString(TrafficRecorder::TrafficMessageType type) { } } -DictionaryValue* TrafficRecorder::TrafficRecord::ToValue() const { - scoped_ptr<DictionaryValue> value; +base::DictionaryValue* TrafficRecorder::TrafficRecord::ToValue() const { + scoped_ptr<base::DictionaryValue> value; if (truncated) { - value.reset(new DictionaryValue()); + value.reset(new base::DictionaryValue()); value->SetString("message_type", GetMessageTypeString(message_type)); value->SetBoolean("truncated", true); @@ -90,8 +90,8 @@ DictionaryValue* TrafficRecorder::TrafficRecord::ToValue() const { } -ListValue* TrafficRecorder::ToValue() const { - scoped_ptr<ListValue> value(new ListValue()); +base::ListValue* TrafficRecorder::ToValue() const { + scoped_ptr<base::ListValue> value(new base::ListValue()); std::deque<TrafficRecord>::const_iterator it; for (it = records_.begin(); it != records_.end(); ++it) { const TrafficRecord& record = *it; diff --git a/sync/engine/traffic_recorder.h b/sync/engine/traffic_recorder.h index 65e652e..94639ab 100644 --- a/sync/engine/traffic_recorder.h +++ b/sync/engine/traffic_recorder.h @@ -45,7 +45,7 @@ class SYNC_EXPORT_PRIVATE TrafficRecorder { base::Time time); TrafficRecord(); ~TrafficRecord(); - DictionaryValue* ToValue() const; + base::DictionaryValue* ToValue() const; // Time of record creation. base::Time timestamp; @@ -57,7 +57,7 @@ class SYNC_EXPORT_PRIVATE TrafficRecorder { void RecordClientToServerMessage(const sync_pb::ClientToServerMessage& msg); void RecordClientToServerResponse( const sync_pb::ClientToServerResponse& response); - ListValue* ToValue() const; + base::ListValue* ToValue() const; const std::deque<TrafficRecord>& records() { return records_; diff --git a/sync/engine/traffic_recorder_unittest.cc b/sync/engine/traffic_recorder_unittest.cc index 19d682a..4928604 100644 --- a/sync/engine/traffic_recorder_unittest.cc +++ b/sync/engine/traffic_recorder_unittest.cc @@ -109,10 +109,10 @@ TEST(TrafficRecorderTest, ToValueTimestampTest) { recorder.set_time(sample_time); recorder.RecordClientToServerResponse(response); - scoped_ptr<ListValue> value; + scoped_ptr<base::ListValue> value; value.reset(recorder.ToValue()); - DictionaryValue* record_value; + base::DictionaryValue* record_value; std::string time_str; ASSERT_TRUE(value->GetDictionary(0, &record_value)); diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc index db5f595..633b766 100644 --- a/sync/internal_api/base_node.cc +++ b/sync/internal_api/base_node.cc @@ -227,8 +227,8 @@ int BaseNode::GetPositionIndex() const { return GetEntry()->GetPositionIndex(); } -DictionaryValue* BaseNode::GetSummaryAsValue() const { - DictionaryValue* node_info = new DictionaryValue(); +base::DictionaryValue* BaseNode::GetSummaryAsValue() const { + base::DictionaryValue* node_info = new base::DictionaryValue(); node_info->SetString("id", base::Int64ToString(GetId())); node_info->SetBoolean("isFolder", GetIsFolder()); node_info->SetString("title", GetTitle()); @@ -236,8 +236,8 @@ DictionaryValue* BaseNode::GetSummaryAsValue() const { return node_info; } -DictionaryValue* BaseNode::GetDetailsAsValue() const { - DictionaryValue* node_info = GetSummaryAsValue(); +base::DictionaryValue* BaseNode::GetDetailsAsValue() const { + base::DictionaryValue* node_info = GetSummaryAsValue(); node_info->SetString( "modificationTime", GetTimeDebugString(GetModificationTime())); node_info->SetString("parentId", base::Int64ToString(GetParentId())); diff --git a/sync/internal_api/change_record.cc b/sync/internal_api/change_record.cc index b3aeb99..4894b3c 100644 --- a/sync/internal_api/change_record.cc +++ b/sync/internal_api/change_record.cc @@ -17,8 +17,8 @@ ChangeRecord::ChangeRecord() ChangeRecord::~ChangeRecord() {} -DictionaryValue* ChangeRecord::ToValue() const { - DictionaryValue* value = new DictionaryValue(); +base::DictionaryValue* ChangeRecord::ToValue() const { + base::DictionaryValue* value = new base::DictionaryValue(); std::string action_str; switch (action) { case ACTION_ADD: @@ -55,7 +55,7 @@ ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData( ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {} -DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const { +base::DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const { return PasswordSpecificsDataToValue(unencrypted_); } diff --git a/sync/internal_api/js_mutation_event_observer_unittest.cc b/sync/internal_api/js_mutation_event_observer_unittest.cc index b14cb81..4f449cf 100644 --- a/sync/internal_api/js_mutation_event_observer_unittest.cc +++ b/sync/internal_api/js_mutation_event_observer_unittest.cc @@ -70,10 +70,10 @@ TEST_F(JsMutationEventObserverTest, OnChangesApplied) { for (int i = AUTOFILL_PROFILE; i < MODEL_TYPE_COUNT; ++i) { const std::string& model_type_str = ModelTypeToString(ModelTypeFromInt(i)); - DictionaryValue expected_details; + base::DictionaryValue expected_details; expected_details.SetString("modelType", model_type_str); expected_details.SetString("writeTransactionId", "0"); - ListValue* expected_changes = new ListValue(); + base::ListValue* expected_changes = new base::ListValue(); expected_details.Set("changes", expected_changes); for (int j = i; j < MODEL_TYPE_COUNT; ++j) { expected_changes->Append(changes[j].ToValue()); @@ -98,7 +98,7 @@ TEST_F(JsMutationEventObserverTest, OnChangesComplete) { InSequence dummy; for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) { - DictionaryValue expected_details; + base::DictionaryValue expected_details; expected_details.SetString( "modelType", ModelTypeToString(ModelTypeFromInt(i))); diff --git a/sync/internal_api/js_sync_encryption_handler_observer.cc b/sync/internal_api/js_sync_encryption_handler_observer.cc index 2885dd1..d6bd50e 100644 --- a/sync/internal_api/js_sync_encryption_handler_observer.cc +++ b/sync/internal_api/js_sync_encryption_handler_observer.cc @@ -35,7 +35,7 @@ void JsSyncEncryptionHandlerObserver::OnPassphraseRequired( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetString("reason", PassphraseRequiredReasonToString(reason)); HandleJsEvent(FROM_HERE, "onPassphraseRequired", JsEventDetails(&details)); @@ -45,7 +45,7 @@ void JsSyncEncryptionHandlerObserver::OnPassphraseAccepted() { if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; HandleJsEvent(FROM_HERE, "onPassphraseAccepted", JsEventDetails(&details)); } @@ -55,7 +55,7 @@ void JsSyncEncryptionHandlerObserver::OnBootstrapTokenUpdated( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetString("bootstrapToken", "<redacted>"); details.SetString("type", BootstrapTokenTypeToString(type)); HandleJsEvent(FROM_HERE, "onBootstrapTokenUpdated", JsEventDetails(&details)); @@ -67,7 +67,7 @@ void JsSyncEncryptionHandlerObserver::OnEncryptedTypesChanged( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.Set("encryptedTypes", ModelTypeSetToValue(encrypted_types)); details.SetBoolean("encryptEverything", encrypt_everything); @@ -79,7 +79,7 @@ void JsSyncEncryptionHandlerObserver::OnEncryptionComplete() { if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; HandleJsEvent(FROM_HERE, "onEncryptionComplete", JsEventDetails()); } @@ -88,7 +88,7 @@ void JsSyncEncryptionHandlerObserver::OnCryptographerStateChanged( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetBoolean("ready", cryptographer->is_ready()); details.SetBoolean("hasPendingKeys", @@ -104,7 +104,7 @@ void JsSyncEncryptionHandlerObserver::OnPassphraseTypeChanged( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetString("passphraseType", PassphraseTypeToString(type)); details.SetInteger("explicitPassphraseTime", diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc index cbc9996..01ddda8 100644 --- a/sync/internal_api/js_sync_manager_observer.cc +++ b/sync/internal_api/js_sync_manager_observer.cc @@ -34,7 +34,7 @@ void JsSyncManagerObserver::OnSyncCycleCompleted( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.Set("snapshot", snapshot.ToValue()); HandleJsEvent(FROM_HERE, "onSyncCycleCompleted", JsEventDetails(&details)); } @@ -43,7 +43,7 @@ void JsSyncManagerObserver::OnConnectionStatusChange(ConnectionStatus status) { if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetString("status", ConnectionStatusToString(status)); HandleJsEvent(FROM_HERE, "onConnectionStatusChange", JsEventDetails(&details)); @@ -53,7 +53,7 @@ void JsSyncManagerObserver::OnUpdatedToken(const std::string& token) { if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.SetString("token", "<redacted>"); HandleJsEvent(FROM_HERE, "onUpdatedToken", JsEventDetails(&details)); } @@ -63,7 +63,7 @@ void JsSyncManagerObserver::OnActionableError( if (!event_handler_.IsInitialized()) { return; } - DictionaryValue details; + base::DictionaryValue details; details.Set("syncError", sync_error.ToValue()); HandleJsEvent(FROM_HERE, "onActionableError", JsEventDetails(&details)); @@ -79,7 +79,7 @@ void JsSyncManagerObserver::OnInitializationComplete( // Ignore the |js_backend| argument; it's not really convertible to // JSON anyway. - DictionaryValue details; + base::DictionaryValue details; details.Set("restoredTypes", ModelTypeSetToValue(restored_types)); HandleJsEvent(FROM_HERE, diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc index 40c71be..56580f4 100644 --- a/sync/internal_api/js_sync_manager_observer_unittest.cc +++ b/sync/internal_api/js_sync_manager_observer_unittest.cc @@ -56,7 +56,7 @@ TEST_F(JsSyncManagerObserverTest, NoArgNotifiations) { } TEST_F(JsSyncManagerObserverTest, OnInitializationComplete) { - DictionaryValue expected_details; + base::DictionaryValue expected_details; syncer::ModelTypeSet restored_types; restored_types.Put(BOOKMARKS); restored_types.Put(NIGORI); @@ -88,7 +88,7 @@ TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { base::Time::Now(), std::vector<int>(MODEL_TYPE_COUNT, 0), std::vector<int>(MODEL_TYPE_COUNT, 0)); - DictionaryValue expected_details; + base::DictionaryValue expected_details; expected_details.Set("snapshot", snapshot.ToValue()); EXPECT_CALL(mock_js_event_handler_, @@ -103,7 +103,7 @@ TEST_F(JsSyncManagerObserverTest, OnActionableError) { SyncProtocolError sync_error; sync_error.action = CLEAR_USER_DATA_AND_RESYNC; sync_error.error_type = TRANSIENT_ERROR; - DictionaryValue expected_details; + base::DictionaryValue expected_details; expected_details.Set("syncError", sync_error.ToValue()); EXPECT_CALL(mock_js_event_handler_, @@ -117,7 +117,7 @@ TEST_F(JsSyncManagerObserverTest, OnActionableError) { TEST_F(JsSyncManagerObserverTest, OnConnectionStatusChange) { const ConnectionStatus kStatus = CONNECTION_AUTH_ERROR; - DictionaryValue expected_details; + base::DictionaryValue expected_details; expected_details.SetString("status", ConnectionStatusToString(kStatus)); @@ -130,9 +130,9 @@ TEST_F(JsSyncManagerObserverTest, OnConnectionStatusChange) { } TEST_F(JsSyncManagerObserverTest, SensitiveNotifiations) { - DictionaryValue redacted_token_details; + base::DictionaryValue redacted_token_details; redacted_token_details.SetString("token", "<redacted>"); - DictionaryValue redacted_bootstrap_token_details; + base::DictionaryValue redacted_bootstrap_token_details; redacted_bootstrap_token_details.SetString("bootstrapToken", "<redacted>"); EXPECT_CALL(mock_js_event_handler_, diff --git a/sync/internal_api/public/base/invalidation.cc b/sync/internal_api/public/base/invalidation.cc index f5f6168..472fad2 100644 --- a/sync/internal_api/public/base/invalidation.cc +++ b/sync/internal_api/public/base/invalidation.cc @@ -33,7 +33,7 @@ bool AckHandle::Equals(const AckHandle& other) const { } scoped_ptr<base::DictionaryValue> AckHandle::ToValue() const { - scoped_ptr<DictionaryValue> value(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); value->SetString("state", state_); value->SetString("timestamp", base::Int64ToString(timestamp_.ToInternalValue())); @@ -76,14 +76,14 @@ bool Invalidation::Equals(const Invalidation& other) const { } scoped_ptr<base::DictionaryValue> Invalidation::ToValue() const { - scoped_ptr<DictionaryValue> value(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); value->SetString("payload", payload); value->Set("ackHandle", ack_handle.ToValue().release()); return value.Pass(); } bool Invalidation::ResetFromValue(const base::DictionaryValue& value) { - const DictionaryValue* ack_handle_value = NULL; + const base::DictionaryValue* ack_handle_value = NULL; return value.GetString("payload", &payload) && value.GetDictionary("ackHandle", &ack_handle_value) && diff --git a/sync/internal_api/public/base/model_type_invalidation_map.cc b/sync/internal_api/public/base/model_type_invalidation_map.cc index 65a125f..7ced0ff 100644 --- a/sync/internal_api/public/base/model_type_invalidation_map.cc +++ b/sync/internal_api/public/base/model_type_invalidation_map.cc @@ -35,16 +35,16 @@ ModelTypeSet ModelTypeInvalidationMapToSet( std::string ModelTypeInvalidationMapToString( const ModelTypeInvalidationMap& invalidation_map) { - scoped_ptr<DictionaryValue> value( + scoped_ptr<base::DictionaryValue> value( ModelTypeInvalidationMapToValue(invalidation_map)); std::string json; base::JSONWriter::Write(value.get(), &json); return json; } -DictionaryValue* ModelTypeInvalidationMapToValue( +base::DictionaryValue* ModelTypeInvalidationMapToValue( const ModelTypeInvalidationMap& invalidation_map) { - DictionaryValue* value = new DictionaryValue(); + base::DictionaryValue* value = new base::DictionaryValue(); for (ModelTypeInvalidationMap::const_iterator it = invalidation_map.begin(); it != invalidation_map.end(); ++it) { std::string printable_payload; diff --git a/sync/internal_api/public/base/model_type_invalidation_map_unittest.cc b/sync/internal_api/public/base/model_type_invalidation_map_unittest.cc index 772ee7e..016e167 100644 --- a/sync/internal_api/public/base/model_type_invalidation_map_unittest.cc +++ b/sync/internal_api/public/base/model_type_invalidation_map_unittest.cc @@ -32,7 +32,8 @@ TEST_F(ModelTypeInvalidationMapTest, TypeInvalidationMapToValue) { states[BOOKMARKS].payload = "bookmarkpayload"; states[APPS].payload = ""; - scoped_ptr<DictionaryValue> value(ModelTypeInvalidationMapToValue(states)); + scoped_ptr<base::DictionaryValue> value( + ModelTypeInvalidationMapToValue(states)); EXPECT_EQ(2u, value->size()); ExpectDictStringValue(states[BOOKMARKS].payload, *value, "Bookmarks"); ExpectDictStringValue(std::string(), *value, "Apps"); diff --git a/sync/internal_api/public/base/progress_marker_map.cc b/sync/internal_api/public/base/progress_marker_map.cc index 20d7ea3..b281013 100644 --- a/sync/internal_api/public/base/progress_marker_map.cc +++ b/sync/internal_api/public/base/progress_marker_map.cc @@ -10,9 +10,9 @@ namespace syncer { -scoped_ptr<DictionaryValue> ProgressMarkerMapToValue( +scoped_ptr<base::DictionaryValue> ProgressMarkerMapToValue( const ProgressMarkerMap& marker_map) { - scoped_ptr<DictionaryValue> value(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); for (ProgressMarkerMap::const_iterator it = marker_map.begin(); it != marker_map.end(); ++it) { std::string printable_payload; diff --git a/sync/internal_api/public/change_record_unittest.cc b/sync/internal_api/public/change_record_unittest.cc index cd54189..201ed65 100644 --- a/sync/internal_api/public/change_record_unittest.cc +++ b/sync/internal_api/public/change_record_unittest.cc @@ -60,7 +60,7 @@ void CheckChangeRecordValue( value.Get("extra", &extra_value)); EXPECT_TRUE(Value::Equals(extra_value, expected_extra_value.get())); - scoped_ptr<DictionaryValue> expected_specifics_value( + scoped_ptr<base::DictionaryValue> expected_specifics_value( EntitySpecificsToValue(record.specifics)); ExpectDictDictionaryValue(*expected_specifics_value, value, "specifics"); @@ -70,7 +70,7 @@ void CheckChangeRecordValue( class MockExtraChangeRecordData : public ExtraPasswordChangeRecordData { public: - MOCK_CONST_METHOD0(ToValue, DictionaryValue*()); + MOCK_CONST_METHOD0(ToValue, base::DictionaryValue*()); }; TEST_F(ChangeRecordTest, ChangeRecordToValue) { @@ -88,7 +88,7 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) { record.id = kTestId; record.specifics = old_specifics; record.extra.reset(new StrictMock<MockExtraChangeRecordData>()); - scoped_ptr<DictionaryValue> value(record.ToValue()); + scoped_ptr<base::DictionaryValue> value(record.ToValue()); CheckChangeRecordValue(record, *value); } @@ -99,7 +99,7 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) { record.id = kTestId; record.specifics = old_specifics; record.extra.reset(new StrictMock<MockExtraChangeRecordData>()); - scoped_ptr<DictionaryValue> value(record.ToValue()); + scoped_ptr<base::DictionaryValue> value(record.ToValue()); CheckChangeRecordValue(record, *value); } @@ -109,7 +109,7 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) { record.action = ChangeRecord::ACTION_DELETE; record.id = kTestId; record.specifics = old_specifics; - scoped_ptr<DictionaryValue> value(record.ToValue()); + scoped_ptr<base::DictionaryValue> value(record.ToValue()); CheckChangeRecordValue(record, *value); } @@ -120,15 +120,15 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) { record.id = kTestId; record.specifics = old_specifics; - DictionaryValue extra_value; + base::DictionaryValue extra_value; extra_value.SetString("foo", "bar"); scoped_ptr<StrictMock<MockExtraChangeRecordData> > extra( new StrictMock<MockExtraChangeRecordData>()); EXPECT_CALL(*extra, ToValue()).Times(2).WillRepeatedly( - Invoke(&extra_value, &DictionaryValue::DeepCopy)); + Invoke(&extra_value, &base::DictionaryValue::DeepCopy)); record.extra.reset(extra.release()); - scoped_ptr<DictionaryValue> value(record.ToValue()); + scoped_ptr<base::DictionaryValue> value(record.ToValue()); CheckChangeRecordValue(record, *value); } } diff --git a/sync/internal_api/public/engine/model_safe_worker.cc b/sync/internal_api/public/engine/model_safe_worker.cc index a4d142b..44e0a24 100644 --- a/sync/internal_api/public/engine/model_safe_worker.cc +++ b/sync/internal_api/public/engine/model_safe_worker.cc @@ -23,7 +23,8 @@ base::DictionaryValue* ModelSafeRoutingInfoToValue( std::string ModelSafeRoutingInfoToString( const ModelSafeRoutingInfo& routing_info) { - scoped_ptr<DictionaryValue> dict(ModelSafeRoutingInfoToValue(routing_info)); + scoped_ptr<base::DictionaryValue> dict( + ModelSafeRoutingInfoToValue(routing_info)); std::string json; base::JSONWriter::Write(dict.get(), &json); return json; diff --git a/sync/internal_api/public/engine/model_safe_worker_unittest.cc b/sync/internal_api/public/engine/model_safe_worker_unittest.cc index f879109..acddb7a7 100644 --- a/sync/internal_api/public/engine/model_safe_worker_unittest.cc +++ b/sync/internal_api/public/engine/model_safe_worker_unittest.cc @@ -19,11 +19,11 @@ TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToValue) { routing_info[BOOKMARKS] = GROUP_PASSIVE; routing_info[NIGORI] = GROUP_UI; routing_info[PREFERENCES] = GROUP_DB; - DictionaryValue expected_value; + base::DictionaryValue expected_value; expected_value.SetString("Bookmarks", "GROUP_PASSIVE"); expected_value.SetString("Encryption keys", "GROUP_UI"); expected_value.SetString("Preferences", "GROUP_DB"); - scoped_ptr<DictionaryValue> value( + scoped_ptr<base::DictionaryValue> value( ModelSafeRoutingInfoToValue(routing_info)); EXPECT_TRUE(value->Equals(&expected_value)); } diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc index 8c0c2b9..03da223 100644 --- a/sync/internal_api/public/sessions/sync_session_snapshot.cc +++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc @@ -53,8 +53,8 @@ SyncSessionSnapshot::SyncSessionSnapshot( SyncSessionSnapshot::~SyncSessionSnapshot() {} -DictionaryValue* SyncSessionSnapshot::ToValue() const { - scoped_ptr<DictionaryValue> value(new DictionaryValue()); +base::DictionaryValue* SyncSessionSnapshot::ToValue() const { + scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); value->SetInteger("numSuccessfulCommits", model_neutral_state_.num_successful_commits); value->SetInteger("numSuccessfulBookmarkCommits", @@ -86,9 +86,10 @@ DictionaryValue* SyncSessionSnapshot::ToValue() const { value->Set("source", source_.ToValue()); value->SetBoolean("notificationsEnabled", notifications_enabled_); - scoped_ptr<DictionaryValue> counter_entries(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> counter_entries( + new base::DictionaryValue()); for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; i++) { - scoped_ptr<DictionaryValue> type_entries(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> type_entries(new base::DictionaryValue()); type_entries->SetInteger("numEntries", num_entries_by_type_[i]); type_entries->SetInteger("numToDeleteEntries", num_to_delete_entries_by_type_[i]); @@ -101,7 +102,7 @@ DictionaryValue* SyncSessionSnapshot::ToValue() const { } std::string SyncSessionSnapshot::ToString() const { - scoped_ptr<DictionaryValue> value(ToValue()); + scoped_ptr<base::DictionaryValue> value(ToValue()); std::string json; base::JSONWriter::WriteWithOptions(value.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, diff --git a/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc b/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc index 1d9f198..36056e3 100644 --- a/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc +++ b/sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc @@ -36,7 +36,7 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) { ProgressMarkerMap download_progress_markers; download_progress_markers[BOOKMARKS] = "test"; download_progress_markers[APPS] = "apps"; - scoped_ptr<DictionaryValue> expected_download_progress_markers_value( + scoped_ptr<base::DictionaryValue> expected_download_progress_markers_value( ProgressMarkerMapToValue(download_progress_markers)); const bool kIsSilenced = true; @@ -45,7 +45,7 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) { const int kNumServerConflicts = 1057; SyncSourceInfo source; - scoped_ptr<DictionaryValue> expected_source_value(source.ToValue()); + scoped_ptr<base::DictionaryValue> expected_source_value(source.ToValue()); SyncSessionSnapshot snapshot(model_neutral, download_progress_markers, @@ -59,7 +59,7 @@ TEST_F(SyncSessionSnapshotTest, SyncSessionSnapshotToValue) { base::Time::Now(), std::vector<int>(MODEL_TYPE_COUNT,0), std::vector<int>(MODEL_TYPE_COUNT, 0)); - scoped_ptr<DictionaryValue> value(snapshot.ToValue()); + scoped_ptr<base::DictionaryValue> value(snapshot.ToValue()); EXPECT_EQ(17u, value->size()); ExpectDictIntegerValue(model_neutral.num_successful_commits, *value, "numSuccessfulCommits"); diff --git a/sync/internal_api/public/sessions/sync_source_info.cc b/sync/internal_api/public/sessions/sync_source_info.cc index c3b08d1..5c05de6 100644 --- a/sync/internal_api/public/sessions/sync_source_info.cc +++ b/sync/internal_api/public/sessions/sync_source_info.cc @@ -23,8 +23,8 @@ SyncSourceInfo::SyncSourceInfo( SyncSourceInfo::~SyncSourceInfo() {} -DictionaryValue* SyncSourceInfo::ToValue() const { - DictionaryValue* value = new DictionaryValue(); +base::DictionaryValue* SyncSourceInfo::ToValue() const { + base::DictionaryValue* value = new base::DictionaryValue(); value->SetString("updatesSource", GetUpdatesSourceString(updates_source)); value->Set("types", ModelTypeInvalidationMapToValue(types)); diff --git a/sync/internal_api/public/sessions/sync_source_info_unittest.cc b/sync/internal_api/public/sessions/sync_source_info_unittest.cc index 8769e8e..cbdecf17 100644 --- a/sync/internal_api/public/sessions/sync_source_info_unittest.cc +++ b/sync/internal_api/public/sessions/sync_source_info_unittest.cc @@ -26,12 +26,12 @@ TEST_F(SyncSourceInfoTest, SyncSourceInfoToValue) { ModelTypeInvalidationMap types; types[PREFERENCES].payload = "preferencespayload"; types[EXTENSIONS].payload = ""; - scoped_ptr<DictionaryValue> expected_types_value( + scoped_ptr<base::DictionaryValue> expected_types_value( ModelTypeInvalidationMapToValue(types)); SyncSourceInfo source_info(updates_source, types); - scoped_ptr<DictionaryValue> value(source_info.ToValue()); + scoped_ptr<base::DictionaryValue> value(source_info.ToValue()); EXPECT_EQ(2u, value->size()); ExpectDictStringValue("PERIODIC", *value, "updatesSource"); ExpectDictDictionaryValue(*expected_types_value, *value, "types"); diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h index a916b30..12636fe 100644 --- a/sync/internal_api/sync_manager_impl.h +++ b/sync/internal_api/sync_manager_impl.h @@ -212,7 +212,7 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : std::string payload; // Returned pointer owned by the caller. - DictionaryValue* ToValue() const; + base::DictionaryValue* ToValue() const; }; base::TimeDelta GetNudgeDelayTimeDelta(const ModelType& model_type); @@ -279,7 +279,7 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : const std::string& name, UnboundJsMessageHandler unbound_message_handler); // Returned pointer is owned by the caller. - static DictionaryValue* NotificationInfoToValue( + static base::DictionaryValue* NotificationInfoToValue( const NotificationInfoMap& notification_info); static std::string NotificationInfoToString( diff --git a/sync/js/js_arg_list.cc b/sync/js/js_arg_list.cc index 8eec0aa..e3317e5 100644 --- a/sync/js/js_arg_list.cc +++ b/sync/js/js_arg_list.cc @@ -10,11 +10,11 @@ namespace syncer { JsArgList::JsArgList() {} -JsArgList::JsArgList(ListValue* args) : args_(args) {} +JsArgList::JsArgList(base::ListValue* args) : args_(args) {} JsArgList::~JsArgList() {} -const ListValue& JsArgList::Get() const { +const base::ListValue& JsArgList::Get() const { return args_.Get(); } diff --git a/sync/js/js_arg_list.h b/sync/js/js_arg_list.h index 72793e9..34a0cf6 100644 --- a/sync/js/js_arg_list.h +++ b/sync/js/js_arg_list.h @@ -23,18 +23,18 @@ class SYNC_EXPORT JsArgList { JsArgList(); // Takes over the data in |args|, leaving |args| empty. - explicit JsArgList(ListValue* args); + explicit JsArgList(base::ListValue* args); ~JsArgList(); - const ListValue& Get() const; + const base::ListValue& Get() const; std::string ToString() const; // Copy constructor and assignment operator welcome. private: - typedef Immutable<ListValue, HasSwapMemFnByPtr<ListValue> > + typedef Immutable<base::ListValue, HasSwapMemFnByPtr<base::ListValue> > ImmutableListValue; ImmutableListValue args_; }; diff --git a/sync/js/js_event_details.cc b/sync/js/js_event_details.cc index 16e4df7..0517b39 100644 --- a/sync/js/js_event_details.cc +++ b/sync/js/js_event_details.cc @@ -10,11 +10,12 @@ namespace syncer { JsEventDetails::JsEventDetails() {} -JsEventDetails::JsEventDetails(DictionaryValue* details) : details_(details) {} +JsEventDetails::JsEventDetails(base::DictionaryValue* details) + : details_(details) {} JsEventDetails::~JsEventDetails() {} -const DictionaryValue& JsEventDetails::Get() const { +const base::DictionaryValue& JsEventDetails::Get() const { return details_.Get(); } diff --git a/sync/js/js_event_details.h b/sync/js/js_event_details.h index 9ca36db..ae970cc 100644 --- a/sync/js/js_event_details.h +++ b/sync/js/js_event_details.h @@ -23,18 +23,19 @@ class SYNC_EXPORT JsEventDetails { JsEventDetails(); // Takes over the data in |details|, leaving |details| empty. - explicit JsEventDetails(DictionaryValue* details); + explicit JsEventDetails(base::DictionaryValue* details); ~JsEventDetails(); - const DictionaryValue& Get() const; + const base::DictionaryValue& Get() const; std::string ToString() const; // Copy constructor and assignment operator welcome. private: - typedef Immutable<DictionaryValue, HasSwapMemFnByPtr<DictionaryValue> > + typedef Immutable<base::DictionaryValue, + HasSwapMemFnByPtr<base::DictionaryValue> > ImmutableDictionaryValue; ImmutableDictionaryValue details_; diff --git a/sync/js/js_event_details_unittest.cc b/sync/js/js_event_details_unittest.cc index 563def7..d93d521 100644 --- a/sync/js/js_event_details_unittest.cc +++ b/sync/js/js_event_details_unittest.cc @@ -19,11 +19,11 @@ TEST_F(JsEventDetailsTest, EmptyList) { } TEST_F(JsEventDetailsTest, FromDictionary) { - DictionaryValue dict; + base::DictionaryValue dict; dict.SetString("foo", "bar"); - dict.Set("baz", new ListValue()); + dict.Set("baz", new base::ListValue()); - scoped_ptr<DictionaryValue> dict_copy(dict.DeepCopy()); + scoped_ptr<base::DictionaryValue> dict_copy(dict.DeepCopy()); JsEventDetails details(&dict); diff --git a/sync/js/js_test_util.cc b/sync/js/js_test_util.cc index 6d9679f..331efcc 100644 --- a/sync/js/js_test_util.cc +++ b/sync/js/js_test_util.cc @@ -88,8 +88,8 @@ class HasDetailsMatcher } ::testing::Matcher<const JsArgList&> HasArgsAsList( - const ListValue& expected_args) { - scoped_ptr<ListValue> expected_args_copy(expected_args.DeepCopy()); + const base::ListValue& expected_args) { + scoped_ptr<base::ListValue> expected_args_copy(expected_args.DeepCopy()); return HasArgs(JsArgList(expected_args_copy.get())); } @@ -99,8 +99,8 @@ class HasDetailsMatcher } ::testing::Matcher<const JsEventDetails&> HasDetailsAsDictionary( - const DictionaryValue& expected_details) { - scoped_ptr<DictionaryValue> expected_details_copy( + const base::DictionaryValue& expected_details) { + scoped_ptr<base::DictionaryValue> expected_details_copy( expected_details.DeepCopy()); return HasDetails(JsEventDetails(expected_details_copy.get())); } diff --git a/sync/notifier/object_id_invalidation_map.cc b/sync/notifier/object_id_invalidation_map.cc index 5fa253e..47b08e6 100644 --- a/sync/notifier/object_id_invalidation_map.cc +++ b/sync/notifier/object_id_invalidation_map.cc @@ -56,10 +56,10 @@ bool ObjectIdInvalidationMapEquals( scoped_ptr<base::ListValue> ObjectIdInvalidationMapToValue( const ObjectIdInvalidationMap& invalidation_map) { - scoped_ptr<ListValue> value(new ListValue()); + scoped_ptr<base::ListValue> value(new base::ListValue()); for (ObjectIdInvalidationMap::const_iterator it = invalidation_map.begin(); it != invalidation_map.end(); ++it) { - DictionaryValue* entry = new DictionaryValue(); + base::DictionaryValue* entry = new base::DictionaryValue(); entry->Set("objectId", ObjectIdToValue(it->first).release()); entry->Set("state", it->second.ToValue().release()); value->Append(entry); diff --git a/sync/notifier/p2p_invalidator.cc b/sync/notifier/p2p_invalidator.cc index 7825757..8b54c04 100644 --- a/sync/notifier/p2p_invalidator.cc +++ b/sync/notifier/p2p_invalidator.cc @@ -100,7 +100,7 @@ bool P2PNotificationData::Equals(const P2PNotificationData& other) const { } std::string P2PNotificationData::ToString() const { - scoped_ptr<DictionaryValue> dict(new DictionaryValue()); + scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); dict->SetString(kSenderIdKey, sender_id_); dict->SetString(kNotificationTypeKey, P2PNotificationTargetToString(target_)); @@ -112,7 +112,7 @@ std::string P2PNotificationData::ToString() const { } bool P2PNotificationData::ResetFromString(const std::string& str) { - scoped_ptr<Value> data_value(base::JSONReader::Read(str)); + scoped_ptr<base::Value> data_value(base::JSONReader::Read(str)); const base::DictionaryValue* data_dict = NULL; if (!data_value.get() || !data_value->GetAsDictionary(&data_dict)) { LOG(WARNING) << "Could not parse " << str << " as a dictionary"; diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc index 39473a7..1b09864 100644 --- a/sync/protocol/proto_value_conversions.cc +++ b/sync/protocol/proto_value_conversions.cc @@ -335,7 +335,7 @@ base::DictionaryValue* DictionarySpecificsToValue( namespace { -DictionaryValue* FaviconSyncFlagsToValue( +base::DictionaryValue* FaviconSyncFlagsToValue( const sync_pb::FaviconSyncFlags& proto) { base::DictionaryValue* value = new base::DictionaryValue(); SET_BOOL(enabled); @@ -378,9 +378,9 @@ base::DictionaryValue* ExtensionSpecificsToValue( } namespace { -DictionaryValue* FaviconDataToValue( +base::DictionaryValue* FaviconDataToValue( const sync_pb::FaviconData& proto) { - DictionaryValue* value = new DictionaryValue(); + base::DictionaryValue* value = new base::DictionaryValue(); SET_BYTES(favicon); SET_INT32(width); SET_INT32(height); @@ -388,9 +388,9 @@ DictionaryValue* FaviconDataToValue( } } // namespace -DictionaryValue* FaviconImageSpecificsToValue( +base::DictionaryValue* FaviconImageSpecificsToValue( const sync_pb::FaviconImageSpecifics& proto) { - DictionaryValue* value = new DictionaryValue(); + base::DictionaryValue* value = new base::DictionaryValue(); SET_STR(favicon_url); SET(favicon_web, FaviconDataToValue); SET(favicon_web_32, FaviconDataToValue); @@ -399,9 +399,9 @@ DictionaryValue* FaviconImageSpecificsToValue( return value; } -DictionaryValue* FaviconTrackingSpecificsToValue( +base::DictionaryValue* FaviconTrackingSpecificsToValue( const sync_pb::FaviconTrackingSpecifics& proto) { - DictionaryValue* value = new DictionaryValue(); + base::DictionaryValue* value = new base::DictionaryValue(); SET_STR(favicon_url); SET_INT64(last_visit_time_ms) SET_BOOL(is_bookmarked); @@ -577,10 +577,10 @@ base::DictionaryValue* EntitySpecificsToValue( namespace { -StringValue* UniquePositionToStringValue( +base::StringValue* UniquePositionToStringValue( const sync_pb::UniquePosition& proto) { UniquePosition pos = UniquePosition::FromProto(proto); - return new StringValue(pos.ToDebugString()); + return new base::StringValue(pos.ToDebugString()); } base::DictionaryValue* SyncEntityToValue(const sync_pb::SyncEntity& proto, diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc index b33366f..79d4886 100644 --- a/sync/protocol/proto_value_conversions_unittest.cc +++ b/sync/protocol/proto_value_conversions_unittest.cc @@ -42,9 +42,9 @@ class ProtoValueConversionsTest : public testing::Test { protected: template <class T> void TestSpecificsToValue( - DictionaryValue* (*specifics_to_value)(const T&)) { + base::DictionaryValue* (*specifics_to_value)(const T&)) { const T& specifics(T::default_instance()); - scoped_ptr<DictionaryValue> value(specifics_to_value(specifics)); + scoped_ptr<base::DictionaryValue> value(specifics_to_value(specifics)); // We can't do much but make sure that this doesn't crash. } }; @@ -85,7 +85,8 @@ TEST_F(ProtoValueConversionsTest, TabNavigationToValue) { TEST_F(ProtoValueConversionsTest, PasswordSpecificsData) { sync_pb::PasswordSpecificsData specifics; specifics.set_password_value("secret"); - scoped_ptr<DictionaryValue> value(PasswordSpecificsDataToValue(specifics)); + scoped_ptr<base::DictionaryValue> value( + PasswordSpecificsDataToValue(specifics)); EXPECT_FALSE(value->empty()); std::string password_value; EXPECT_TRUE(value->GetString("password_value", &password_value)); @@ -100,7 +101,7 @@ TEST_F(ProtoValueConversionsTest, AppSettingSpecificsToValue) { sync_pb::AppNotificationSettings specifics; specifics.set_disabled(true); specifics.set_oauth_client_id("some_id_value"); - scoped_ptr<DictionaryValue> value(AppSettingsToValue(specifics)); + scoped_ptr<base::DictionaryValue> value(AppSettingsToValue(specifics)); EXPECT_FALSE(value->empty()); bool disabled_value = false; std::string oauth_client_id_value; @@ -132,7 +133,7 @@ TEST_F(ProtoValueConversionsTest, BookmarkSpecificsData) { sync_pb::BookmarkSpecifics specifics; specifics.set_creation_time_us(creation_time.ToInternalValue()); specifics.set_icon_url(icon_url); - scoped_ptr<DictionaryValue> value(BookmarkSpecificsToValue(specifics)); + scoped_ptr<base::DictionaryValue> value(BookmarkSpecificsToValue(specifics)); EXPECT_FALSE(value->empty()); std::string encoded_time; EXPECT_TRUE(value->GetString("creation_time_us", &encoded_time)); @@ -254,7 +255,7 @@ TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) { #undef SET_FIELD - scoped_ptr<DictionaryValue> value(EntitySpecificsToValue(specifics)); + scoped_ptr<base::DictionaryValue> value(EntitySpecificsToValue(specifics)); EXPECT_EQ(MODEL_TYPE_COUNT - FIRST_REAL_MODEL_TYPE - (LAST_PROXY_TYPE - FIRST_PROXY_TYPE + 1), static_cast<int>(value->size())); @@ -263,11 +264,11 @@ TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) { namespace { // Returns whether the given value has specifics under the entries in the given // path. -bool ValueHasSpecifics(const DictionaryValue& value, +bool ValueHasSpecifics(const base::DictionaryValue& value, const std::string& path) { - const ListValue* entities_list = NULL; - const DictionaryValue* entry_dictionary = NULL; - const DictionaryValue* specifics_dictionary = NULL; + const base::ListValue* entities_list = NULL; + const base::DictionaryValue* entry_dictionary = NULL; + const base::DictionaryValue* specifics_dictionary = NULL; if (!value.GetList(path, &entities_list)) return false; @@ -288,13 +289,13 @@ TEST_F(ProtoValueConversionsTest, ClientToServerMessageToValue) { sync_pb::SyncEntity* entity = commit_message->add_entries(); entity->mutable_specifics(); - scoped_ptr<DictionaryValue> value_with_specifics( + scoped_ptr<base::DictionaryValue> value_with_specifics( ClientToServerMessageToValue(message, true /* include_specifics */)); EXPECT_FALSE(value_with_specifics->empty()); EXPECT_TRUE(ValueHasSpecifics(*(value_with_specifics.get()), "commit.entries")); - scoped_ptr<DictionaryValue> value_without_specifics( + scoped_ptr<base::DictionaryValue> value_without_specifics( ClientToServerMessageToValue(message, false /* include_specifics */)); EXPECT_FALSE(value_without_specifics->empty()); EXPECT_FALSE(ValueHasSpecifics(*(value_without_specifics.get()), @@ -309,13 +310,13 @@ TEST_F(ProtoValueConversionsTest, ClientToServerResponseToValue) { sync_pb::SyncEntity* entity = response->add_entries(); entity->mutable_specifics(); - scoped_ptr<DictionaryValue> value_with_specifics( + scoped_ptr<base::DictionaryValue> value_with_specifics( ClientToServerResponseToValue(message, true /* include_specifics */)); EXPECT_FALSE(value_with_specifics->empty()); EXPECT_TRUE(ValueHasSpecifics(*(value_with_specifics.get()), "get_updates.entries")); - scoped_ptr<DictionaryValue> value_without_specifics( + scoped_ptr<base::DictionaryValue> value_without_specifics( ClientToServerResponseToValue(message, false /* include_specifics */)); EXPECT_FALSE(value_without_specifics->empty()); EXPECT_FALSE(ValueHasSpecifics(*(value_without_specifics.get()), diff --git a/sync/protocol/sync_protocol_error.cc b/sync/protocol/sync_protocol_error.cc index ce55bcd..cd22e9a 100644 --- a/sync/protocol/sync_protocol_error.cc +++ b/sync/protocol/sync_protocol_error.cc @@ -51,8 +51,8 @@ SyncProtocolError::SyncProtocolError() SyncProtocolError::~SyncProtocolError() { } -DictionaryValue* SyncProtocolError::ToValue() const { - DictionaryValue* value = new DictionaryValue(); +base::DictionaryValue* SyncProtocolError::ToValue() const { + base::DictionaryValue* value = new base::DictionaryValue(); value->SetString("ErrorType", GetSyncErrorTypeString(error_type)); value->SetString("ErrorDescription", error_description); diff --git a/sync/protocol/sync_protocol_error.h b/sync/protocol/sync_protocol_error.h index 3fe52ba..be9232d 100644 --- a/sync/protocol/sync_protocol_error.h +++ b/sync/protocol/sync_protocol_error.h @@ -78,7 +78,7 @@ struct SYNC_EXPORT SyncProtocolError { ModelTypeSet error_data_types; SyncProtocolError(); ~SyncProtocolError(); - DictionaryValue* ToValue() const; + base::DictionaryValue* ToValue() const; }; SYNC_EXPORT const char* GetSyncErrorTypeString(SyncProtocolErrorType type); diff --git a/sync/syncable/entry.cc b/sync/syncable/entry.cc index f888392..7739098 100644 --- a/sync/syncable/entry.cc +++ b/sync/syncable/entry.cc @@ -42,8 +42,8 @@ Directory* Entry::dir() const { return basetrans_->directory(); } -DictionaryValue* Entry::ToValue(Cryptographer* cryptographer) const { - DictionaryValue* entry_info = new DictionaryValue(); +base::DictionaryValue* Entry::ToValue(Cryptographer* cryptographer) const { + base::DictionaryValue* entry_info = new base::DictionaryValue(); entry_info->SetBoolean("good", good()); if (good()) { entry_info->Set("kernel", kernel_->ToValue(cryptographer)); diff --git a/sync/syncable/entry_kernel.cc b/sync/syncable/entry_kernel.cc index b65eaa2..d872695 100644 --- a/sync/syncable/entry_kernel.cc +++ b/sync/syncable/entry_kernel.cc @@ -125,8 +125,8 @@ base::StringValue* StringToValue(const std::string& str) { return new base::StringValue(str); } -StringValue* UniquePositionToValue(const UniquePosition& pos) { - return Value::CreateStringValue(pos.ToDebugString()); +base::StringValue* UniquePositionToValue(const UniquePosition& pos) { + return base::Value::CreateStringValue(pos.ToDebugString()); } } // namespace diff --git a/sync/syncable/model_type_unittest.cc b/sync/syncable/model_type_unittest.cc index 5af6dbc..737aea3 100644 --- a/sync/syncable/model_type_unittest.cc +++ b/sync/syncable/model_type_unittest.cc @@ -39,7 +39,7 @@ TEST_F(ModelTypeTest, ModelTypeFromValue) { TEST_F(ModelTypeTest, ModelTypeSetToValue) { const ModelTypeSet model_types(BOOKMARKS, APPS); - scoped_ptr<ListValue> value(ModelTypeSetToValue(model_types)); + scoped_ptr<base::ListValue> value(ModelTypeSetToValue(model_types)); EXPECT_EQ(2u, value->GetSize()); std::string types[2]; EXPECT_TRUE(value->GetString(0, &types[0])); @@ -51,7 +51,7 @@ TEST_F(ModelTypeTest, ModelTypeSetToValue) { TEST_F(ModelTypeTest, ModelTypeSetFromValue) { // Try empty set first. ModelTypeSet model_types; - scoped_ptr<ListValue> value(ModelTypeSetToValue(model_types)); + scoped_ptr<base::ListValue> value(ModelTypeSetToValue(model_types)); EXPECT_TRUE(model_types.Equals(ModelTypeSetFromValue(*value))); // Now try with a few random types. diff --git a/sync/syncable/nigori_util.cc b/sync/syncable/nigori_util.cc index 3e456dd..3da7917 100644 --- a/sync/syncable/nigori_util.cc +++ b/sync/syncable/nigori_util.cc @@ -172,7 +172,7 @@ bool UpdateEntryWithEncryption( } else { // Encrypt new_specifics into generated_specifics. if (VLOG_IS_ON(2)) { - scoped_ptr<DictionaryValue> value(entry->ToValue(NULL)); + scoped_ptr<base::DictionaryValue> value(entry->ToValue(NULL)); std::string info; base::JSONWriter::WriteWithOptions(value.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, diff --git a/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc index 3ceb080..0423c41 100644 --- a/sync/syncable/syncable_unittest.cc +++ b/sync/syncable/syncable_unittest.cc @@ -50,7 +50,7 @@ class SyncableKernelTest : public testing::Test {}; TEST_F(SyncableKernelTest, ToValue) { EntryKernel kernel; - scoped_ptr<DictionaryValue> value(kernel.ToValue(NULL)); + scoped_ptr<base::DictionaryValue> value(kernel.ToValue(NULL)); if (value) { // Not much to check without repeating the ToValue() code. EXPECT_TRUE(value->HasKey("isDirty")); @@ -392,7 +392,7 @@ TEST_F(SyncableGeneralTest, ToValue) { Entry e(&rtrans, GET_BY_ID, id); EXPECT_FALSE(e.good()); // Hasn't been written yet. - scoped_ptr<DictionaryValue> value(e.ToValue(NULL)); + scoped_ptr<base::DictionaryValue> value(e.ToValue(NULL)); ExpectDictBooleanValue(false, *value, "good"); EXPECT_EQ(1u, value->size()); } @@ -405,7 +405,7 @@ TEST_F(SyncableGeneralTest, ToValue) { me.Put(ID, id); me.Put(BASE_VERSION, 1); - scoped_ptr<DictionaryValue> value(me.ToValue(NULL)); + scoped_ptr<base::DictionaryValue> value(me.ToValue(NULL)); ExpectDictBooleanValue(true, *value, "good"); EXPECT_TRUE(value->HasKey("kernel")); ExpectDictStringValue("Bookmarks", *value, "modelType"); diff --git a/sync/test/accounts_client/test_accounts_client_unittest.cc b/sync/test/accounts_client/test_accounts_client_unittest.cc index ff405f6..c478cd4 100644 --- a/sync/test/accounts_client/test_accounts_client_unittest.cc +++ b/sync/test/accounts_client/test_accounts_client_unittest.cc @@ -61,7 +61,7 @@ TEST(TestAccountsClientTest, ClaimAccountSuccess) { usernames.push_back("foo2@gmail.com"); NoNetworkTestAccountsClient client(kServer, kAccountSpace, usernames); - DictionaryValue success_dict; + base::DictionaryValue success_dict; success_dict.Set("username", new StringValue(kUsername)); success_dict.Set("account_space", new StringValue(kAccountSpace)); success_dict.Set("session_id", new StringValue(kSessionId)); |