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

Side by Side Diff: chrome/browser/chromeos/extensions/file_handler_util.cc

Issue 11418048: Add copy and assignment to FundamentalValue and StringValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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
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/chromeos/extensions/file_handler_util.h" 5 #include "chrome/browser/chromeos/extensions/file_handler_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 extensions::EventRouter* event_router = 934 extensions::EventRouter* event_router =
935 extensions::ExtensionSystem::Get(profile())->event_router(); 935 extensions::ExtensionSystem::Get(profile())->event_router();
936 if (!event_router) { 936 if (!event_router) {
937 ExecuteDoneOnUIThread(false); 937 ExecuteDoneOnUIThread(false);
938 return; 938 return;
939 } 939 }
940 940
941 SetupHandlerHostFileAccessPermissions(handler_pid); 941 SetupHandlerHostFileAccessPermissions(handler_pid);
942 942
943 scoped_ptr<ListValue> event_args(new ListValue()); 943 scoped_ptr<ListValue> event_args(new ListValue());
944 event_args->Append(Value::CreateStringValue(action_id_)); 944 event_args->Append(new base::StringValue(action_id_));
945 DictionaryValue* details = new DictionaryValue(); 945 DictionaryValue* details = new DictionaryValue();
946 event_args->Append(details); 946 event_args->Append(details);
947 // Get file definitions. These will be replaced with Entry instances by 947 // Get file definitions. These will be replaced with Entry instances by
948 // chromeHidden.Event.dispatchEvent() method from event_binding.js. 948 // chromeHidden.Event.dispatchEvent() method from event_binding.js.
949 ListValue* files_urls = new ListValue(); 949 ListValue* files_urls = new ListValue();
950 details->Set("entries", files_urls); 950 details->Set("entries", files_urls);
951 for (FileDefinitionList::const_iterator iter = file_list.begin(); 951 for (FileDefinitionList::const_iterator iter = file_list.begin();
952 iter != file_list.end(); 952 iter != file_list.end();
953 ++iter) { 953 ++iter) {
954 DictionaryValue* file_def = new DictionaryValue(); 954 DictionaryValue* file_def = new DictionaryValue();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 // Make sure this url really being used by the right caller extension. 1060 // Make sure this url really being used by the right caller extension.
1061 if (source_url_.GetOrigin() != url.origin()) 1061 if (source_url_.GetOrigin() != url.origin())
1062 return false; 1062 return false;
1063 1063
1064 FilePath local_path = url.path(); 1064 FilePath local_path = url.path();
1065 extensions::LaunchPlatformAppWithPath(profile(), GetExtension(), local_path); 1065 extensions::LaunchPlatformAppWithPath(profile(), GetExtension(), local_path);
1066 return true; 1066 return true;
1067 } 1067 }
1068 1068
1069 } // namespace file_handler_util 1069 } // namespace file_handler_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698