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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_tasks.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_manager/private_api_tasks.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 const std::set<std::string> mime_types = 232 const std::set<std::string> mime_types =
233 GetUniqueMimeTypes(params->mime_types); 233 GetUniqueMimeTypes(params->mime_types);
234 234
235 // If there weren't any mime_types, and all the suffixes were blank, 235 // If there weren't any mime_types, and all the suffixes were blank,
236 // then we "succeed", but don't actually associate with anything. 236 // then we "succeed", but don't actually associate with anything.
237 // Otherwise, any time we set the default on a file with no extension 237 // Otherwise, any time we set the default on a file with no extension
238 // on the local drive, we'd fail. 238 // on the local drive, we'd fail.
239 // TODO(gspencer): Fix file manager so that it never tries to set default in 239 // TODO(gspencer): Fix file manager so that it never tries to set default in
240 // cases where extensionless local files are part of the selection. 240 // cases where extensionless local files are part of the selection.
241 if (suffixes.empty() && mime_types.empty()) { 241 if (suffixes.empty() && mime_types.empty()) {
242 return RespondNow( 242 return RespondNow(OneArgument(base::MakeUnique<base::Value>(true)));
243 OneArgument(base::MakeUnique<base::FundamentalValue>(true)));
244 } 243 }
245 244
246 file_manager::file_tasks::UpdateDefaultTask( 245 file_manager::file_tasks::UpdateDefaultTask(
247 profile->GetPrefs(), params->task_id, suffixes, mime_types); 246 profile->GetPrefs(), params->task_id, suffixes, mime_types);
248 return RespondNow(NoArguments()); 247 return RespondNow(NoArguments());
249 } 248 }
250 249
251 } // namespace extensions 250 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698