| 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 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 void DriveFileSystem::SetHideHostedDocuments(bool hide) { | 1399 void DriveFileSystem::SetHideHostedDocuments(bool hide) { |
| 1400 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1400 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 1401 | 1401 |
| 1402 if (hide == hide_hosted_docs_) | 1402 if (hide == hide_hosted_docs_) |
| 1403 return; | 1403 return; |
| 1404 | 1404 |
| 1405 hide_hosted_docs_ = hide; | 1405 hide_hosted_docs_ = hide; |
| 1406 | 1406 |
| 1407 // Kick off directory refresh when this setting changes. | 1407 // Kick off directory refresh when this setting changes. |
| 1408 FOR_EACH_OBSERVER(DriveFileSystemObserver, observers_, | 1408 FOR_EACH_OBSERVER(DriveFileSystemObserver, observers_, |
| 1409 OnDirectoryChanged(util::GetDriveMyDriveRootPath())); | 1409 OnDirectoryChanged(util::GetDriveGrandRootPath())); |
| 1410 } | 1410 } |
| 1411 | 1411 |
| 1412 //============= DriveFileSystem: internal helper functions ===================== | 1412 //============= DriveFileSystem: internal helper functions ===================== |
| 1413 | 1413 |
| 1414 void DriveFileSystem::InitializePreferenceObserver() { | 1414 void DriveFileSystem::InitializePreferenceObserver() { |
| 1415 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1415 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 1416 | 1416 |
| 1417 pref_registrar_.reset(new PrefChangeRegistrar()); | 1417 pref_registrar_.reset(new PrefChangeRegistrar()); |
| 1418 pref_registrar_->Init(profile_->GetPrefs()); | 1418 pref_registrar_->Init(profile_->GetPrefs()); |
| 1419 pref_registrar_->Add( | 1419 pref_registrar_->Add( |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1712 return; | 1712 return; |
| 1713 } | 1713 } |
| 1714 | 1714 |
| 1715 PlatformFileInfoProto entry_file_info; | 1715 PlatformFileInfoProto entry_file_info; |
| 1716 util::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); | 1716 util::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); |
| 1717 *entry_proto->mutable_file_info() = entry_file_info; | 1717 *entry_proto->mutable_file_info() = entry_file_info; |
| 1718 callback.Run(DRIVE_FILE_OK, entry_proto.Pass()); | 1718 callback.Run(DRIVE_FILE_OK, entry_proto.Pass()); |
| 1719 } | 1719 } |
| 1720 | 1720 |
| 1721 } // namespace drive | 1721 } // namespace drive |
| OLD | NEW |