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

Side by Side Diff: chrome/browser/chromeos/drive/file_system_util.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 (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/drive/file_system_util.h" 5 #include "chrome/browser/chromeos/drive/file_system_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/files/file_util.h" 15 #include "base/files/file_util.h"
16 #include "base/i18n/icu_string_conversions.h" 16 #include "base/i18n/icu_string_conversions.h"
17 #include "base/json/json_file_value_serializer.h" 17 #include "base/json/json_file_value_serializer.h"
18 #include "base/logging.h" 18 #include "base/logging.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/scoped_ptr.h" 20 #include "base/memory/scoped_ptr.h"
21 #include "base/prefs/pref_service.h"
22 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
23 #include "base/strings/string_util.h" 22 #include "base/strings/string_util.h"
24 #include "base/strings/stringprintf.h" 23 #include "base/strings/stringprintf.h"
25 #include "base/thread_task_runner_handle.h" 24 #include "base/thread_task_runner_handle.h"
26 #include "base/threading/sequenced_worker_pool.h" 25 #include "base/threading/sequenced_worker_pool.h"
27 #include "chrome/browser/browser_process.h" 26 #include "chrome/browser/browser_process.h"
28 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 27 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
29 #include "chrome/browser/chromeos/drive/write_on_cache_file.h" 28 #include "chrome/browser/chromeos/drive/write_on_cache_file.h"
30 #include "chrome/browser/chromeos/profiles/profile_helper.h" 29 #include "chrome/browser/chromeos/profiles/profile_helper.h"
31 #include "chrome/browser/chromeos/profiles/profile_util.h" 30 #include "chrome/browser/chromeos/profiles/profile_util.h"
32 #include "chrome/browser/profiles/profile.h" 31 #include "chrome/browser/profiles/profile.h"
33 #include "chrome/browser/profiles/profile_manager.h" 32 #include "chrome/browser/profiles/profile_manager.h"
34 #include "chrome/common/chrome_constants.h" 33 #include "chrome/common/chrome_constants.h"
35 #include "chrome/common/chrome_paths_internal.h" 34 #include "chrome/common/chrome_paths_internal.h"
36 #include "chromeos/chromeos_constants.h" 35 #include "chromeos/chromeos_constants.h"
37 #include "components/drive/drive.pb.h" 36 #include "components/drive/drive.pb.h"
38 #include "components/drive/drive_pref_names.h" 37 #include "components/drive/drive_pref_names.h"
39 #include "components/drive/file_system_core_util.h" 38 #include "components/drive/file_system_core_util.h"
40 #include "components/drive/file_system_interface.h" 39 #include "components/drive/file_system_interface.h"
41 #include "components/drive/job_list.h" 40 #include "components/drive/job_list.h"
41 #include "components/prefs/pref_service.h"
42 #include "components/user_manager/user_manager.h" 42 #include "components/user_manager/user_manager.h"
43 #include "content/public/browser/browser_thread.h" 43 #include "content/public/browser/browser_thread.h"
44 #include "net/base/escape.h" 44 #include "net/base/escape.h"
45 #include "storage/browser/fileapi/file_system_url.h" 45 #include "storage/browser/fileapi/file_system_url.h"
46 46
47 using content::BrowserThread; 47 using content::BrowserThread;
48 48
49 namespace drive { 49 namespace drive {
50 namespace util { 50 namespace util {
51 51
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 const bool disable_sync_over_celluar = 251 const bool disable_sync_over_celluar =
252 profile->GetPrefs()->GetBoolean(prefs::kDisableDriveOverCellular); 252 profile->GetPrefs()->GetBoolean(prefs::kDisableDriveOverCellular);
253 253
254 if (is_connection_cellular && disable_sync_over_celluar) 254 if (is_connection_cellular && disable_sync_over_celluar)
255 return DRIVE_CONNECTED_METERED; 255 return DRIVE_CONNECTED_METERED;
256 return DRIVE_CONNECTED; 256 return DRIVE_CONNECTED;
257 } 257 }
258 258
259 } // namespace util 259 } // namespace util
260 } // namespace drive 260 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698