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

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_api.cc

Issue 16472007: Rename StorageMonitor Initialize function to EnsureInitialized for better understanding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comments Created 7 years, 6 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/extensions/api/media_galleries_private/media_galleries_private_api.cc » ('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 // Implements the Chrome Extensions Media Galleries API. 5 // Implements the Chrome Extensions Media Galleries API.
6 6
7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h" 7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h"
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 scoped_ptr<GetMediaFileSystems::Params> params( 86 scoped_ptr<GetMediaFileSystems::Params> params(
87 GetMediaFileSystems::Params::Create(*args_)); 87 GetMediaFileSystems::Params::Create(*args_));
88 EXTENSION_FUNCTION_VALIDATE(params.get()); 88 EXTENSION_FUNCTION_VALIDATE(params.get());
89 MediaGalleries::GetMediaFileSystemsInteractivity interactive = 89 MediaGalleries::GetMediaFileSystemsInteractivity interactive =
90 MediaGalleries::GET_MEDIA_FILE_SYSTEMS_INTERACTIVITY_NO; 90 MediaGalleries::GET_MEDIA_FILE_SYSTEMS_INTERACTIVITY_NO;
91 if (params->details.get() && params->details->interactive != MediaGalleries:: 91 if (params->details.get() && params->details->interactive != MediaGalleries::
92 GET_MEDIA_FILE_SYSTEMS_INTERACTIVITY_NONE) { 92 GET_MEDIA_FILE_SYSTEMS_INTERACTIVITY_NONE) {
93 interactive = params->details->interactive; 93 interactive = params->details->interactive;
94 } 94 }
95 95
96 chrome::StorageMonitor::GetInstance()->Initialize(base::Bind( 96 chrome::StorageMonitor::GetInstance()->EnsureInitialized(base::Bind(
97 &MediaGalleriesGetMediaFileSystemsFunction::OnStorageMonitorInit, 97 &MediaGalleriesGetMediaFileSystemsFunction::OnStorageMonitorInit,
98 this, 98 this,
99 interactive)); 99 interactive));
100 return true; 100 return true;
101 } 101 }
102 102
103 void MediaGalleriesGetMediaFileSystemsFunction::OnStorageMonitorInit( 103 void MediaGalleriesGetMediaFileSystemsFunction::OnStorageMonitorInit(
104 MediaGalleries::GetMediaFileSystemsInteractivity interactive) { 104 MediaGalleries::GetMediaFileSystemsInteractivity interactive) {
105 switch (interactive) { 105 switch (interactive) {
106 case MediaGalleries::GET_MEDIA_FILE_SYSTEMS_INTERACTIVITY_YES: { 106 case MediaGalleries::GET_MEDIA_FILE_SYSTEMS_INTERACTIVITY_YES: {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 bool MediaGalleriesAssembleMediaFileFunction::RunImpl() { 248 bool MediaGalleriesAssembleMediaFileFunction::RunImpl() {
249 if (!ApiIsAccessible(&error_)) 249 if (!ApiIsAccessible(&error_))
250 return false; 250 return false;
251 251
252 // TODO(vandebo) Update the metadata and return the new file. 252 // TODO(vandebo) Update the metadata and return the new file.
253 SetResult(base::Value::CreateNullValue()); 253 SetResult(base::Value::CreateNullValue());
254 return true; 254 return true;
255 } 255 }
256 256
257 } // namespace extensions 257 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698