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

Side by Side Diff: pkg/appengine/lib/src/appengine_context.dart

Issue 804973002: Add appengine/gcloud/mustache dependencies. (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Added AUTHORS/LICENSE/PATENTS files Created 6 years 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
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library appengine.appengine_context;
6
7 import 'server/assets.dart';
8
9 class AppengineContext {
10 final String applicationID;
11 final String partition;
12 final String version;
13 final String module;
14 final String instance;
15 final AssetsManager assets;
16
17 AppengineContext(String partition, this.applicationID, this.version,
18 this.module, this.instance, Uri pubServeUrl)
19 : partition = partition,
20 assets = new AssetsManager(pubServeUrl, partition == 'dev');
21
22 bool get isDevelopmentEnvironment => partition == 'dev';
23
24 String get fullQualifiedApplicationId => '$partition~$applicationID';
25
26 String get backgroundTicket {
27 var majorVersion = version.split('_')[0];
28 var escapedApplicationID =
29 applicationID.replaceAll(':', '_').replaceAll('.', '_');
30
31 return '$escapedApplicationID/$module.$majorVersion.$instance';
32 }
33 }
OLDNEW
« no previous file with comments | « pkg/appengine/lib/src/app_engine_request_handler.dart ('k') | pkg/appengine/lib/src/appengine_internal.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698