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

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

Issue 10908262: [cros] disable GDrive option on certain file pickers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self review Created 8 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 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 #include "chrome/browser/chromeos/extensions/file_manager_util.h" 4 #include "chrome/browser/chromeos/extensions/file_manager_util.h"
5 5
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 // file_type_index is 1-based. 0 means no selection at all. 348 // file_type_index is 1-based. 0 means no selection at all.
349 dict->SetBoolean("selected", 349 dict->SetBoolean("selected",
350 (static_cast<size_t>(file_type_index) == (i + 1))); 350 (static_cast<size_t>(file_type_index) == (i + 1)));
351 351
352 types_list->Set(i, dict); 352 types_list->Set(i, dict);
353 } 353 }
354 arg_value.Set("typeList", types_list); 354 arg_value.Set("typeList", types_list);
355 355
356 arg_value.SetBoolean("includeAllFiles", file_types->include_all_files); 356 arg_value.SetBoolean("includeAllFiles", file_types->include_all_files);
357 arg_value.SetBoolean("supportGData", file_types->support_gdata);
357 } 358 }
358 359
359 std::string json_args; 360 std::string json_args;
360 base::JSONWriter::Write(&arg_value, &json_args); 361 base::JSONWriter::Write(&arg_value, &json_args);
361 362
362 // kChromeUIFileManagerURL could not be used since query parameters are not 363 // kChromeUIFileManagerURL could not be used since query parameters are not
363 // supported for it. 364 // supported for it.
364 std::string url = GetFileBrowserUrl().spec() + 365 std::string url = GetFileBrowserUrl().spec() +
365 '?' + net::EscapeUrlEncodedData(json_args, false); 366 '?' + net::EscapeUrlEncodedData(json_args, false);
366 return GURL(url); 367 return GURL(url);
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 OperationRegistry::ProgressStatus>::const_iterator iter = 779 OperationRegistry::ProgressStatus>::const_iterator iter =
779 list.begin(); 780 list.begin();
780 iter != list.end(); ++iter) { 781 iter != list.end(); ++iter) {
781 result_list->Append( 782 result_list->Append(
782 ProgessStatusToDictionaryValue(profile, origin_url, *iter)); 783 ProgessStatusToDictionaryValue(profile, origin_url, *iter));
783 } 784 }
784 return result_list.release(); 785 return result_list.release();
785 } 786 }
786 787
787 } // namespace file_manager_util 788 } // namespace file_manager_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698