| OLD | NEW |
| 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/drive_file_system.h" | 5 #include "chrome/browser/chromeos/drive/drive_file_system.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/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 void DriveFileSystem::SetHideHostedDocuments(bool hide) { | 1373 void DriveFileSystem::SetHideHostedDocuments(bool hide) { |
| 1374 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1374 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 1375 | 1375 |
| 1376 if (hide == hide_hosted_docs_) | 1376 if (hide == hide_hosted_docs_) |
| 1377 return; | 1377 return; |
| 1378 | 1378 |
| 1379 hide_hosted_docs_ = hide; | 1379 hide_hosted_docs_ = hide; |
| 1380 | 1380 |
| 1381 // Kick off directory refresh when this setting changes. | 1381 // Kick off directory refresh when this setting changes. |
| 1382 FOR_EACH_OBSERVER(DriveFileSystemObserver, observers_, | 1382 FOR_EACH_OBSERVER(DriveFileSystemObserver, observers_, |
| 1383 OnDirectoryChanged(util::GetDriveMyDriveRootPath())); | 1383 OnDirectoryChanged(util::GetDriveGrandRootPath())); |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 //============= DriveFileSystem: internal helper functions ===================== | 1386 //============= DriveFileSystem: internal helper functions ===================== |
| 1387 | 1387 |
| 1388 void DriveFileSystem::InitializePreferenceObserver() { | 1388 void DriveFileSystem::InitializePreferenceObserver() { |
| 1389 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1389 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 1390 | 1390 |
| 1391 pref_registrar_.reset(new PrefChangeRegistrar()); | 1391 pref_registrar_.reset(new PrefChangeRegistrar()); |
| 1392 pref_registrar_->Init(profile_->GetPrefs()); | 1392 pref_registrar_->Init(profile_->GetPrefs()); |
| 1393 pref_registrar_->Add( | 1393 pref_registrar_->Add( |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1687 return; | 1687 return; |
| 1688 } | 1688 } |
| 1689 | 1689 |
| 1690 PlatformFileInfoProto entry_file_info; | 1690 PlatformFileInfoProto entry_file_info; |
| 1691 util::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); | 1691 util::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); |
| 1692 *entry_proto->mutable_file_info() = entry_file_info; | 1692 *entry_proto->mutable_file_info() = entry_file_info; |
| 1693 callback.Run(DRIVE_FILE_OK, entry_proto.Pass()); | 1693 callback.Run(DRIVE_FILE_OK, entry_proto.Pass()); |
| 1694 } | 1694 } |
| 1695 | 1695 |
| 1696 } // namespace drive | 1696 } // namespace drive |
| OLD | NEW |