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

Unified Diff: chrome/browser/ui/cocoa/applescript/apple_event_util.mm

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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: chrome/browser/ui/cocoa/applescript/apple_event_util.mm
diff --git a/chrome/browser/ui/cocoa/applescript/apple_event_util.mm b/chrome/browser/ui/cocoa/applescript/apple_event_util.mm
index f798950ae14ac480206eb08b821e8d5605cecde1..566bd4c3decfb4625500f5210f67d343035aa529 100644
--- a/chrome/browser/ui/cocoa/applescript/apple_event_util.mm
+++ b/chrome/browser/ui/cocoa/applescript/apple_event_util.mm
@@ -18,26 +18,26 @@ NSAppleEventDescriptor* ValueToAppleEventDescriptor(const base::Value* value) {
NSAppleEventDescriptor* descriptor = nil;
switch (value->GetType()) {
- case base::Value::TYPE_NULL:
+ case base::Value::Type::NONE:
descriptor = [NSAppleEventDescriptor
descriptorWithTypeCode:cMissingValue];
break;
- case base::Value::TYPE_BOOLEAN: {
+ case base::Value::Type::BOOLEAN: {
bool bool_value;
value->GetAsBoolean(&bool_value);
descriptor = [NSAppleEventDescriptor descriptorWithBoolean:bool_value];
break;
}
- case base::Value::TYPE_INTEGER: {
+ case base::Value::Type::INTEGER: {
int int_value;
value->GetAsInteger(&int_value);
descriptor = [NSAppleEventDescriptor descriptorWithInt32:int_value];
break;
}
- case base::Value::TYPE_DOUBLE: {
+ case base::Value::Type::DOUBLE: {
double double_value;
value->GetAsDouble(&double_value);
descriptor = [NSAppleEventDescriptor
@@ -47,7 +47,7 @@ NSAppleEventDescriptor* ValueToAppleEventDescriptor(const base::Value* value) {
break;
}
- case base::Value::TYPE_STRING: {
+ case base::Value::Type::STRING: {
std::string string_value;
value->GetAsString(&string_value);
descriptor = [NSAppleEventDescriptor descriptorWithString:
@@ -55,11 +55,11 @@ NSAppleEventDescriptor* ValueToAppleEventDescriptor(const base::Value* value) {
break;
}
- case base::Value::TYPE_BINARY:
+ case base::Value::Type::BINARY:
NOTREACHED();
break;
- case base::Value::TYPE_DICTIONARY: {
+ case base::Value::Type::DICTIONARY: {
const base::DictionaryValue* dictionary_value;
value->GetAsDictionary(&dictionary_value);
descriptor = [NSAppleEventDescriptor recordDescriptor];
@@ -80,7 +80,7 @@ NSAppleEventDescriptor* ValueToAppleEventDescriptor(const base::Value* value) {
break;
}
- case base::Value::TYPE_LIST: {
+ case base::Value::Type::LIST: {
const base::ListValue* list_value;
value->GetAsList(&list_value);
descriptor = [NSAppleEventDescriptor listDescriptor];

Powered by Google App Engine
This is Rietveld 408576698