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

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

Issue 10823125: Drive: add a method to clear all local cache. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: review fix (comment #12) Created 8 years, 4 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/gdata/gdata_cache.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 (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/extensions/file_browser_event_router.h" 5 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // when mounting failed or unmounting succeeded. 314 // when mounting failed or unmounting succeeded.
315 if ((event_type == DiskMountManager::MOUNTING) != 315 if ((event_type == DiskMountManager::MOUNTING) !=
316 (error_code == chromeos::MOUNT_ERROR_NONE)) { 316 (error_code == chromeos::MOUNT_ERROR_NONE)) {
317 FilePath source_path(mount_info.source_path); 317 FilePath source_path(mount_info.source_path);
318 gdata::GDataSystemService* system_service = 318 gdata::GDataSystemService* system_service =
319 gdata::GDataSystemServiceFactory::GetForProfile(profile_); 319 gdata::GDataSystemServiceFactory::GetForProfile(profile_);
320 gdata::GDataCache* cache = 320 gdata::GDataCache* cache =
321 system_service ? system_service->cache() : NULL; 321 system_service ? system_service->cache() : NULL;
322 if (cache) { 322 if (cache) {
323 cache->SetMountedStateOnUIThread( 323 cache->SetMountedStateOnUIThread(
324 source_path, false, gdata::SetMountedStateCallback()); 324 source_path, false, gdata::ChangeCacheStateCallback());
325 } 325 }
326 } 326 }
327 } 327 }
328 } 328 }
329 329
330 void FileBrowserEventRouter::OnNetworkManagerChanged( 330 void FileBrowserEventRouter::OnNetworkManagerChanged(
331 chromeos::NetworkLibrary* network_library) { 331 chromeos::NetworkLibrary* network_library) {
332 if (!profile_ || !profile_->GetExtensionEventRouter()) { 332 if (!profile_ || !profile_->GetExtensionEventRouter()) {
333 NOTREACHED(); 333 NOTREACHED();
334 return; 334 return;
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 return scoped_refptr<RefcountedProfileKeyedService>( 812 return scoped_refptr<RefcountedProfileKeyedService>(
813 new FileBrowserEventRouter(profile)); 813 new FileBrowserEventRouter(profile));
814 } 814 }
815 815
816 bool FileBrowserEventRouterFactory::ServiceHasOwnInstanceInIncognito() { 816 bool FileBrowserEventRouterFactory::ServiceHasOwnInstanceInIncognito() {
817 // Explicitly and always allow this router in guest login mode. see 817 // Explicitly and always allow this router in guest login mode. see
818 // chrome/browser/profiles/profile_keyed_base_factory.h comment 818 // chrome/browser/profiles/profile_keyed_base_factory.h comment
819 // for the details. 819 // for the details.
820 return true; 820 return true;
821 } 821 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698