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

Side by Side Diff: chrome/browser/chromeos/extensions/default_app_order.h

Issue 216763004: OEM folder name support for apps installed from rootfs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEFAULT_APP_ORDER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEFAULT_APP_ORDER_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEFAULT_APP_ORDER_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEFAULT_APP_ORDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 namespace default_app_order { 15 namespace default_app_order {
16 16
17 // ExternalLoader checks FILE_DEFAULT_APP_ORDER and loads it if the file 17 // ExternalLoader checks FILE_DEFAULT_APP_ORDER and loads it if the file
18 // exists. Otherwise, it uses the default built-in order. The file loading runs 18 // exists. Otherwise, it uses the default built-in order. The file loading runs
19 // asynchronously on start up except for the browser restart path, in which 19 // asynchronously on start up except for the browser restart path, in which
20 // case, start up will wait for the file check to finish because user profile 20 // case, start up will wait for the file check to finish because user profile
21 // might need to access the ordinals data. 21 // might need to access the ordinals data.
22 class ExternalLoader { 22 class ExternalLoader {
23 public: 23 public:
24 // Constructs an ExternalLoader and starts file loading. |async| is true to 24 // Constructs an ExternalLoader and starts file loading. |async| is true to
25 // load the file asynchronously on the blocking pool. 25 // load the file asynchronously on the blocking pool.
26 explicit ExternalLoader(bool async); 26 explicit ExternalLoader(bool async);
27 ~ExternalLoader(); 27 ~ExternalLoader();
28 28
29 const std::vector<std::string>& GetAppIds(); 29 const std::vector<std::string>& GetAppIds();
30 const std::string& GetOemAppsFolderName();
30 31
31 private: 32 private:
32 void Load(); 33 void Load();
33 34
34 // A vector of app id strings that defines the default order of apps. 35 // A vector of app id strings that defines the default order of apps.
35 std::vector<std::string> app_ids_; 36 std::vector<std::string> app_ids_;
36 37
38 std::string oem_apps_folder_name_;
39
37 base::WaitableEvent loaded_; 40 base::WaitableEvent loaded_;
38 41
39 DISALLOW_COPY_AND_ASSIGN(ExternalLoader); 42 DISALLOW_COPY_AND_ASSIGN(ExternalLoader);
40 }; 43 };
41 44
42 // Gets the ordered list of app ids. 45 // Gets the ordered list of app ids.
43 void Get(std::vector<std::string>* app_ids); 46 void Get(std::vector<std::string>* app_ids);
44 47
48 // Get the name of OEM apps folder in app launcher.
49 std::string GetOemAppsFolderName();
50
45 } // namespace default_app_order 51 } // namespace default_app_order
46 } // namespace chromeos 52 } // namespace chromeos
47 53
48 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEFAULT_APP_ORDER_H_ 54 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_DEFAULT_APP_ORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698