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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/provided_file_system.cc

Issue 661393002: [fsp] Separate logic for saving/restoring state to a separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: C++11 features. Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/provided_file_system_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/file_system_provider/provided_file_system.h" 5 #include "chrome/browser/chromeos/file_system_provider/provided_file_system.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 weak_ptr_factory_.GetWeakPtr(), 469 weak_ptr_factory_.GetWeakPtr(),
470 observed_path, 470 observed_path,
471 change_type, 471 change_type,
472 base::Passed(&child_changes), 472 base::Passed(&child_changes),
473 it->second.last_tag, 473 it->second.last_tag,
474 tag))); 474 tag)));
475 475
476 FOR_EACH_OBSERVER(ProvidedFileSystemObserver, 476 FOR_EACH_OBSERVER(ProvidedFileSystemObserver,
477 observers_, 477 observers_,
478 OnObservedEntryChanged(file_system_info_, 478 OnObservedEntryChanged(file_system_info_,
479 observed_path, 479 it->second,
480 change_type, 480 change_type,
481 child_changes_ref, 481 child_changes_ref,
482 auto_updater->CreateCallback())); 482 auto_updater->CreateCallback()));
483 483
484 return true; 484 return true;
485 } 485 }
486 486
487 base::WeakPtr<ProvidedFileSystemInterface> ProvidedFileSystem::GetWeakPtr() { 487 base::WeakPtr<ProvidedFileSystemInterface> ProvidedFileSystem::GetWeakPtr() {
488 return weak_ptr_factory_.GetWeakPtr(); 488 return weak_ptr_factory_.GetWeakPtr();
489 } 489 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 return; 542 return;
543 543
544 // It's illegal to provide a tag which is not unique. As for now only an error 544 // It's illegal to provide a tag which is not unique. As for now only an error
545 // message is printed, but we may want to pass the error to the providing 545 // message is printed, but we may want to pass the error to the providing
546 // extension. TODO(mtomasz): Consider it. 546 // extension. TODO(mtomasz): Consider it.
547 if (!tag.empty() && tag == it->second.last_tag) 547 if (!tag.empty() && tag == it->second.last_tag)
548 LOG(ERROR) << "Tag specified, but same as the previous one."; 548 LOG(ERROR) << "Tag specified, but same as the previous one.";
549 549
550 it->second.last_tag = tag; 550 it->second.last_tag = tag;
551 551
552 FOR_EACH_OBSERVER( 552 FOR_EACH_OBSERVER(ProvidedFileSystemObserver,
553 ProvidedFileSystemObserver, 553 observers_,
554 observers_, 554 OnObservedEntryTagUpdated(file_system_info_, it->second));
555 OnObservedEntryTagUpdated(file_system_info_, observed_path, tag));
556 555
557 // If the observed entry is deleted, then unobserve it. 556 // If the observed entry is deleted, then unobserve it.
558 if (change_type == ProvidedFileSystemObserver::DELETED) 557 if (change_type == ProvidedFileSystemObserver::DELETED)
559 UnobserveEntry(observed_path, base::Bind(&EmptyStatusCallback)); 558 UnobserveEntry(observed_path, base::Bind(&EmptyStatusCallback));
560 } 559 }
561 560
562 } // namespace file_system_provider 561 } // namespace file_system_provider
563 } // namespace chromeos 562 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/provided_file_system_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698